Skip to content

Concat Series[datetimetz] & Series[category] loses timezone #23816

Closed
@TomAugspurger

Description

@TomAugspurger
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')

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugReshapingConcat, Merge/Join, Stack/Unstack, ExplodeTimezonesTimezone data dtype

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions