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
this seems to happend when there is an object type passed as well
In [55]: df = pd.DataFrame({'a':[1,2,4,7],
'b':[1.2, 2.3, 5.1, 6.3],
'c':list('abcd'),
'd':[pd.datetime(2000,1,1) for i in range(4)]})
In [56]: df
Out[56]:
a b c d
0 1 1.2 a 2000-01-01 00:00:00
1 2 2.3 b 2000-01-01 00:00:00
2 4 5.1 c 2000-01-01 00:00:00
3 7 6.3 d 2000-01-01 00:00:00
In [57]: df.dtypes
Out[57]:
a int64
b float64
c object
d object
# this is ok
In [64]: df = pd.DataFrame({'a':[1,2,4,7], 'b':[1.2, 2.3, 5.1, 6.3], 'd':[pd.datetime(2000,1,1) for i in range(4)]})
In [65]: df.dtypes
Out[65]:
a int64
b float64
d datetime64[ns]