Skip to content

DatetimeIndex with closed='left' or 'right' drop dates at the boundaries #11804

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
thrasibule opened this issue Dec 9, 2015 · 0 comments · Fixed by #11806
Closed

DatetimeIndex with closed='left' or 'right' drop dates at the boundaries #11804

thrasibule opened this issue Dec 9, 2015 · 0 comments · Fixed by #11806
Labels
Bug Datetime Datetime data dtype Frequency DateOffsets
Milestone

Comments

@thrasibule
Copy link
Contributor

When either start or end is at the boundary of a date_range, they get dropped when they shouldn't if we specify the closed argument, see example below:

In [1]: pd.date_range('2015-09-12', '2015-10-30', freq='QS-MAR', closed='right')
Out[1]: DatetimeIndex([], dtype='datetime64[ns]', freq='QS-MAR')

In [2]: pd.date_range('2015-09-01', '2015-10-30', freq='QS-MAR', closed='left')
Out[2]: DatetimeInddex([], dtype='datetime64[ns]', freq='QS-MAR')
@thrasibule thrasibule changed the title DatetimeIndex with closed=left or right drop dates at the boundaries DatetimeIndex with closed='left' or right drop dates at the boundaries Dec 9, 2015
@thrasibule thrasibule changed the title DatetimeIndex with closed='left' or right drop dates at the boundaries DatetimeIndex with closed='left' or 'right' drop dates at the boundaries Dec 9, 2015
@jreback jreback added Datetime Datetime data dtype Frequency DateOffsets labels Dec 10, 2015
@jreback jreback added this to the 0.18.0 milestone Dec 10, 2015
@jreback jreback added the Bug label Dec 10, 2015
@jreback jreback modified the milestones: Next Major Release, 0.18.0 Dec 10, 2015
@jreback jreback modified the milestones: 0.18.0, Next Major Release Dec 17, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Datetime Datetime data dtype Frequency DateOffsets
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants