DatetimeIndex columns cause reset_index() to throw AttributeError #5818
Labels
Bug
Dtype Conversions
Unexpected or buggy dtype conversions
Reshaping
Concat, Merge/Join, Stack/Unstack, Explode
Milestone
It appears that if a dataframe has column headers of type DatetimeIndex, calling reset_index() throws
AttributeError: 'str' object has no attribute 'view'
. I see this both in v0.12 and the master branch.If column headers are strings or integers, reset_index() works fine.
I'm guessing it's treating the new column array as type DatetimeIndex whereas it now has a string in the 0th position ('index'). Maybe the reset_index should first cast the columns as object and convert the DatetimeIndex values to strings?
The text was updated successfully, but these errors were encountered: