Skip to content

resample up skips first day #3020

Closed
Closed
@dsimpson1980

Description

@dsimpson1980

When resampling from a TimeSeries with freq='MS' to freq='D' the TimeSeries is shifted forward by one day, skipping the first element:

In [64]: dates = pd.date_range('01-Apr-13','01-May-13',freq='MS')

In [65]: ts = pd.TimeSeries([1,2],dates)

In [66]: ts
Out[66]: 
2013-04-01    1
2013-05-01    2
Freq: MS

In [67]: ts.resample('d',closed='left',label='left')
Out[67]: 
2013-04-02   NaN
2013-04-03   NaN
2013-04-04   NaN
2013-04-05   NaN
2013-04-06   NaN
2013-04-07   NaN
2013-04-08   NaN
2013-04-09   NaN
2013-04-10   NaN
2013-04-11   NaN
2013-04-12   NaN
2013-04-13   NaN
2013-04-14   NaN
2013-04-15   NaN
2013-04-16   NaN
2013-04-17   NaN
2013-04-18   NaN
2013-04-19   NaN
2013-04-20   NaN
2013-04-21   NaN
2013-04-22   NaN
2013-04-23   NaN
2013-04-24   NaN
2013-04-25   NaN
2013-04-26   NaN
2013-04-27   NaN
2013-04-28   NaN
2013-04-29   NaN
2013-04-30   NaN
2013-05-01     2
2013-05-02   NaN
Freq: D

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions