Re: A pickle problem!

2016-04-24 Thread Fabien
On 04/21/2016 11:43 PM, Paulo da Silva wrote: class C(pd.DataFrame): Note also that subclassing pandas is not always encouraged: http://pandas.pydata.org/pandas-docs/stable/internals.html#subclassing-pandas-data-structures Cheers, Fabien -- https://mail.python.org/mailman/listinfo/python-lis

Re: A pickle problem!

2016-04-22 Thread Paulo da Silva
Às 21:33 de 22-04-2016, Ian Kelly escreveu: > On Fri, Apr 22, 2016 at 2:21 PM, Paulo da Silva > wrote: ... > > If they start with two underscores then you could use the name > mangling to find them. If the class name is MyClass then look for any > keys in the instance dict that start with '_MyCla

Re: A pickle problem!

2016-04-22 Thread Ian Kelly
On Fri, Apr 22, 2016 at 2:21 PM, Paulo da Silva wrote: > Às 17:27 de 22-04-2016, Ian Kelly escreveu: >> On Thu, Apr 21, 2016 at 7:52 PM, Paulo da Silva >> wrote: >>> Às 22:43 de 21-04-2016, Paulo da Silva escreveu: > ... > >> >> Probably this is necessary because the DataFrame class is already >>

Re: A pickle problem!

2016-04-22 Thread Paulo da Silva
Às 17:27 de 22-04-2016, Ian Kelly escreveu: > On Thu, Apr 21, 2016 at 7:52 PM, Paulo da Silva > wrote: >> Às 22:43 de 21-04-2016, Paulo da Silva escreveu: ... > > Probably this is necessary because the DataFrame class is already > customizing its pickle behavior without taking into account the >

Re: A pickle problem!

2016-04-22 Thread Ian Kelly
On Thu, Apr 21, 2016 at 7:52 PM, Paulo da Silva wrote: > Às 22:43 de 21-04-2016, Paulo da Silva escreveu: >> Hi. >> >> Why in this code fragment self.__name is not kept between pickle >> dumps/loads? How to fix it? >> >> Thanks. >> >> import pickle >> import pandas as pd >> import numpy as np >> >

Re: A pickle problem!

2016-04-21 Thread Paulo da Silva
Às 22:43 de 21-04-2016, Paulo da Silva escreveu: > Hi. > > Why in this code fragment self.__name is not kept between pickle > dumps/loads? How to fix it? > > Thanks. > > import pickle > import pandas as pd > import numpy as np > > class C(pd.DataFrame): > def __init__(self,name,*a,**b): >

A pickle problem!

2016-04-21 Thread Paulo da Silva
Hi. Why in this code fragment self.__name is not kept between pickle dumps/loads? How to fix it? Thanks. import pickle import pandas as pd import numpy as np class C(pd.DataFrame): def __init__(self,name,*a,**b): super(C,self).__init__(*a,**b) self.__name