Closed
Description
rows = []
rows.append([pd.datetime(2010, 1, 1), 1])
rows.append([pd.datetime(2010, 1, 2), 'hi']) # test col upconverts to obj
df2_obj = pd.DataFrame.from_records(rows, columns=['date', 'test'])
print df2_obj.date.dtype # object
If the 'hi'
is changed to an int
then df2_obj.date.dtype
is equal to M8[ns]