Skip to content

bug in deep copy of Series with timezone-aware datetime entries #11794

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 8, 2015 · 0 comments · Fixed by #11796
Closed

bug in deep copy of Series with timezone-aware datetime entries #11794

multiloc opened this issue Dec 8, 2015 · 0 comments · Fixed by #11796
Labels
Bug Timezones Timezone data dtype
Milestone

Comments

@multiloc
Copy link
Contributor

multiloc commented Dec 8, 2015

deep copies of Series with timezone-aware datetimes are shallow in 0.17.1:

In [12]: import pandas as pd
In [13]: pd.__version__
Out[13]: u'0.17.1'

In [14]: ser = pd.Series([pd.Timestamp('2012/01/01', tz='UTC')])
In [15]: ser2 = ser.copy(deep=True)
In [18]: ser2[0] = pd.Timestamp('1999/01/01', tz='UTC')

# unexpected mutation
In [19]: ser
Out[19]: 
0   1999-01-01 00:00:00+00:00
dtype: datetime64[ns, UTC]
@jreback jreback added Bug Timezones Timezone data dtype labels Dec 8, 2015
@jreback jreback added this to the 0.18.0 milestone Dec 8, 2015
jreback added a commit to jreback/pandas that referenced this issue Dec 8, 2015
Not always deep-copying the underlying impl, which is a DatetimeIndex where
shallow copies are views
jreback added a commit that referenced this issue Dec 8, 2015
BUG: bug in deep copy of datetime tz-aware objects, #11794
jreback pushed a commit that referenced this issue Jan 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Timezones Timezone data dtype
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants