Skip to content

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

Closed
@multiloc

Description

@multiloc

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]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions