Concat Series[datetimetz] & Series[category] loses timezone · Issue #23816 · pandas-dev/pandas (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
Description
In [8]: a = pd.Series(pd.date_range('20170101', periods=4, tz='US/Pacific'))
In [9]: b = pd.Series(['a', 'b'], dtype='category')
In [10]: pd.concat([a, b], ignore_index=True)[0] Out[10]: Timestamp('2017-01-01 08:00:00')
Out[10] should have a tz like the following
In [11]: pd.concat([a, b.astype(object)], ignore_index=True)[0] Out[11]: Timestamp('2017-01-01 00:00:00-0800', tz='US/Pacific', freq='D')