pandas.tseries.offsets.CustomBusinessHour没有跳过假期

我使用以下代码:

{import holidays
custom_holidays = holidays.Russia(years=2020)
custom_holidays.append({**"2020-06-18"**: 'the first mayskie'})
cbh = pd.tseries.offsets.CustomBusinessHour(start ='10:00',end ='18:00',holidays=custom_holidays)

ts = pd.Timestamp('2020-06-17 16:30:00').tz_localize(tz_mos)
new_timestamp = ts + 8*cbh
new_timestamp}

并得到了在假期日期的输出

时间戳('2020-06-18 16:30:00 + 0300',tz ='dateutil // usr / share / zoneinfo / Europe / Moscow')

使用pd.tseries而不休假的方式是什么?

iCMS 回答:pandas.tseries.offsets.CustomBusinessHour没有跳过假期

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/2142535.html

大家都在问