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
hmm, not behaving properly. as a work-around you can do this:
In [8]: DataFrame(dict([(c,col.astype('category')) for c, col in df.iteritems()]))
Out[8]:
c0 c1
0 A C
1 A C
2 B D
3 B D
In [9]: DataFrame(dict([(c,col.astype('category')) for c, col in df.iteritems()])).dtypes
Out[9]:
c0 category
c1 category
dtype: object
the resut is a series with series as element, not a dataframe:
The text was updated successfully, but these errors were encountered: