0
I need to create a date array of 2018-01-01, 2020-01-11, the dates being nay can be continuous (eg 2018-01-01, 2018-01-02, 2018-01-03...) and include the ends.
The closest I could get was:
import pandas as pd
date_list = pd.date_range(start='2018-01-01', end='2020-01-11', freq = '3M', closed= 'left')
date_list
Out[3]:
DatetimeIndex(['2018-01-31', '2018-04-30', '2018-07-31', '2018-10-31',
'2019-01-31', '2019-04-30', '2019-07-31', '2019-10-31'],
dtype='datetime64[ns]', freq='3M')
However it did not include the extremities (2018-01-01, 2020-01-11).
If they should not be in sequence, how should they be? What is the full sequence you want to get?
– Woss