You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I you think about it, your are aggregating across the columns which are mixed dtypes, so your output will be of dtype object. you can do this to convert back.
In [10]: df.apply(lambda x: x,axis=1).convert_objects()
Out[10]:
foo1 foo2
0 one -0.849480
1 two 0.038060
2 two 0.714368
3 three 0.522911
4 one -1.706384
5 two -0.694232
In [11]: df.apply(lambda x: x,axis=1).convert_objects().dtypes
Out[11]:
foo1 object
foo2 float64
dtype: object
I am not sure this is a bug. We try to use the original dtypes after an apply, but it is not always possible.
Thank you for the clear explanation. Given this explanation I'm not sure either this is a bug; it seems logical and predictable.
However it did work in version 0.10.1 (I just verified it once more). So I presume version 0.10.1 did the conversion automatically. The change in behavior in 0.11.0 broke existing code. If it isn't a regression it should arguably be documented as a backwards incompatible change.
This seems to be a regression from 0.10.1 to 0.11.0
This works:
This does not (notice the apply):
The error raised is:
The text was updated successfully, but these errors were encountered: