Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
DataFrame.reset_index() loses timezone #2262
When timezone-aware datetime.datetime objects are used as the index of a DataFrame via set_index(), undoing the operation with reset_index() loses the timezone.
After the round-trip, the datetime.datetime column becomes a datetime64[ns] column, which can be considered a feature, not a bug. The times are correctly converted to UTC (which is good if you're going to lose the timezone), but the loss of timezone information seems like a bug.
This has been tested against version 0.9.1 on Python 2.7 (Windows 32-bit)
Code to recreate