DatetimeIndex with closed='left' or 'right' drop dates at the boundaries · Issue #11804 · pandas-dev/pandas (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Description
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')