Skip to content

Series.apply loses timezone information #11800

Closed
@multiloc

Description

@multiloc

apply seems to lose timezone awareness. Would expect the following to be invariant:

In [9]: import pandas as pd

In [10]: pd.__version__
Out[10]: u'0.17.1'

In [11]: ser = pd.Series([pd.Timestamp('2015/01/01', tz='UTC'), pd.Timestamp('2015/01/02', tz='UTC')])

In [12]: ser
Out[12]: 
0   2015-01-01 00:00:00+00:00
1   2015-01-02 00:00:00+00:00
dtype: datetime64[ns, UTC]

In [13]: ser.apply(lambda x: x)
Out[13]: 
0   2015-01-01
1   2015-01-02
dtype: datetime64[ns]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions