DateTimeIndex.to_frame() drops timezone in pandas 0.24 · Issue #25809 · pandas-dev/pandas (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Description
Behavior in pandas 0.23:
import pandas as pd pd.version 0.23.0 x = pd.date_range(start='2019-01-01', end='2019-01-30', freq='D') x = x.tz_localize('UTC') x.to_frame().dtypes 0 datetime64[ns, UTC] dtype: object
Behavior in pandas 0.24
import pandas as pd pd.version 0.24.2 x = pd.date_range(start='2019-01-01', end='2019-01-30', freq='D') x = x.tz_localize('UTC') x.to_frame().dtypes 0 datetime64[ns] dtype: object