Skip to content

Regression: date_range closed parameter not honoured in pandas 0.18.0 #12684

Closed
@PH82

Description

@PH82

The behaviour of the method date_range appears to have changed between version 17 and 19. the below example changes the starting bound of the index returned?

print pd.date_range(start=datetime.datetime(2016,3,18,0,0), end=datetime.datetime(2016,3,22,0,0), freq='D', tz='UTC', closed='right')

pandas 0.17.0 Output
DatetimeIndex(['2016-03-19', '2016-03-20', '2016-03-21', '2016-03-22'], dtype='datetime64[ns, UTC]', freq='D')

pandas 0.18.0 Output
DatetimeIndex(['2016-03-18', '2016-03-19', '2016-03-20', '2016-03-21', '2016-03-22'],
dtype='datetime64[ns, UTC]', freq='D')

python: 2.7.11.final.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    DatetimeDatetime data dtypeRegressionFunctionality that used to work in a prior pandas version

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions