Skip to content

Series append function shifts index if timezone information exist #2998

Closed
@ribelo

Description

@ribelo

Code to reproduce:

rng1 = pd.date_range('1/1/2011 01:00', periods=10, freq='H')
rng2 = pd.date_range('1/1/2011 02:00', periods=10, freq='H')
ts1 = pd.Series(np.random.randn(len(rng1)), index=rng1).tz_localize('CET')
ts2 = pd.Series(np.random.randn(len(rng2)), index=rng2).tz_localize('CET')
ts_result = ts1.append(ts2)

Result in IPython:

In [208]:

ts1
Out[208]:
2011-01-01 01:00:00+01:00 0.164609
Freq: H
In [209]:

ts2
Out[209]:
2011-01-01 02:00:00+01:00 2.138849
Freq: H
In [210]:

ts_result
Out[210]:
2011-01-01 00:00:00+01:00 0.164609
2011-01-01 01:00:00+01:00 2.138849

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