Skip to content

Truncate on series causes core dump when TZ is specified on index #9243

Closed
@echu79

Description

@echu79

Hello
I am getting a core dump when truncating a series with a timezone specified on the index. Please see below:

This works fine:

import pandas
import datetime
import numpy as np    
rng = pandas.date_range('1/2/2005', '11/1/2010', freq='D')
ts = pandas.Series(np.random.randn(len(rng)), index=rng)
ts.truncate(datetime.datetime(2009,1,1), datetime.datetime(2011,1,1)).resample('D', how='sum')

However this core dumps for me:

import pandas
import datetime
import numpy as np    
rng = pandas.date_range('1/2/2005', '11/1/2010', freq='D', tz='US/Eastern')
ts = pandas.Series(np.random.randn(len(rng)), index=rng)
ts.truncate(datetime.datetime(2009,1,1), datetime.datetime(2011,1,1)).resample('D', how='sum')

The only difference is adding the TZ parameter to the date_range to set the index for a particular timezone.

This was working fine in .15, but seems to be broken in .15.2

Thanks

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