我惊讶地看到,BDay将2020-01-01视为一个工作日
然后我知道我必须使用定制的工作日
有没有一种有效的方法?我对市场关闭期间的美国假日感兴趣
我的原始代码如下:
end_train = '2019-12-31'
end_train = pd.Timestamp(end_train) # Converts the string to datetime
start_dev = end_train + BDay( 1) # Looks forward 1 Business Day
start_dev = start_dev.strftime('%Y-%m-%d') # Converts the datetime to string
start_dev
'2020-01-01'
目前没有回答
相关问题 更多 >
编程相关推荐