For example,
datetimeidx = pd.DatetimeIndex(
['1999-03-01', '1999-03-02', '1999-03-03', '1999-03-04',
'1999-03-05', '1999-03-08', '1999-03-09', '1999-03-10',
'1999-03-11', '1999-03-12', '2021-11-16', '2021-11-17',
'2021-11-18', '2021-11-19', '2021-11-22', '2021-11-23',
'2021-11-24', '2021-11-26', '2021-11-29', '2021-11-30'])
if n=3
, what I want is:
datetimeidx = pd.DatetimeIndex(
['1999-03-10','1999-03-11', '1999-03-12',
'2021-11-26', '2021-11-29', '2021-11-30'])
The point is that I want to select only from the 'given' pd.DatetimeIndex