Hi Adrian,
I have observed the bug on a Windows 7 SP1 64 bits system, completely
updated. Python is 3.4.1.final.0 through the Anaconda distribution (conda
version 3.7.3.)
Yes I do reproduce what you have seen: in the VE right clicking on df1 and
then copying the result somewhere yields the correct content. And yes, in
the IPython console, everything is displaying correctly (both df0 and df1).
So the bug is really about displaying df1 in the VE, which fails with the
error message that I reported. Again, this only difference between df0 and
df1, as far as I can see, is that the timestamp column is not in an index
in df1.
Cheers
Le vendredi 5 décembre 2014 15:54:10 UTC+1, Charles Vellutini a écrit :
>
> Hi,
>
> I have Spyder 2.3.2 installed.
>
> The variable explorer can now display DataFrames, and this is a major
> improvement.
>
> Now there appears to be a bug when a column is made of timestamps and when
> that column is *not* an index.
>
> In the code below, df0 can be viewed without problem in the variable
> explorer, but df1 fails with error "TypeError: bad operand type for abs():
> 'NaTType'".
>
> Thanks
>
>
> ##########code##############
>
> import pandas as pd
>
> import numpy as np
>
>
> dates = [pd.datetime(2012, 5, 1), pd.datetime(2012, 5, 2),
> pd.datetime(2012, 5, 3)]
>
>
> ts = pd.Series(np.random.randn(3), dates)
>
> df0=pd.DataFrame(ts)
>
> df0['OtherIndex']=('0','1','2')
>
> df1=df0.reset_index('OtherIndex')
>
>
> ###########end of code##########
>
--
You received this message because you are subscribed to the Google Groups
"spyder" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/spyderlib.
For more options, visit https://groups.google.com/d/optout.