-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Closed
Labels
Milestone
Description
I have a datetime.datetime, convert it to ordinal and try to read it back with pd.Timestamp.fromordinal(). This produces the following error:
In [112]: dt
Out[112]: datetime.datetime(2011, 4, 16, 0, 0)
In [113]: pd.Timestamp.fromordinal(dt.toordinal())
Exception AttributeError: "'int' object has no attribute 'utcoffset'" in 'pandas.tslib._localize_tso' ignored
Out[113]: <Timestamp: 1970-01-01 00:00:00.000002011>
Am I expecting something wrong by thinking this should work or is it a bug?