Skip to content

Series.apply loses timezone information #11800

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
multiloc opened this issue Dec 9, 2015 · 2 comments
Closed

Series.apply loses timezone information #11800

multiloc opened this issue Dec 9, 2015 · 2 comments
Labels
Bug Duplicate Report Duplicate issue or pull request Timezones Timezone data dtype

Comments

@multiloc
Copy link
Contributor

multiloc commented Dec 9, 2015

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]
@jreback
Copy link
Contributor

jreback commented Dec 9, 2015

xref #11564

cc @kawochen

yeh, .apply return inference is being revamped as of above.

@jreback jreback added this to the Next Major Release milestone Dec 9, 2015
@jreback
Copy link
Contributor

jreback commented Dec 12, 2015

yep this is a dupe of #11757

@jreback jreback closed this as completed Dec 12, 2015
@jreback jreback added the Duplicate Report Duplicate issue or pull request label Dec 12, 2015
@jorisvandenbossche jorisvandenbossche modified the milestones: No action, Next Major Release Feb 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Duplicate Report Duplicate issue or pull request Timezones Timezone data dtype
Projects
None yet
Development

No branches or pull requests

3 participants