问题
'This is a basic question that I can't seem to find addressed anywhere.
I understand how to make a custom business day calendar per the pandas documentation.
However, I have a datetime index that is already created and is 'customized'. It is a date range with particular dates eliminated:
custom_datelist:
2003-01-02
2003-01-03
2003-01-05
2003-01-06
2003-01-09
...
So, with this calendar, how do I create a date offset? The documentation indicates how to generate the date series but it isn't clear about the offset in this case. Would my offset simply be:
pd.to_datetime('2003-01-06') + 1*custom_datelist
give me pd.to_datetime('2003-01-09')
?
Thanks.
来源:https://stackoverflow.com/questions/48737245/pandas-custom-business-day-calendar-offset