gpt4 book ai didi

python - 为什么在 pandas USFederalHolidayCalendar 中假期被编码为 MemorialDay?

转载 作者:太空宇宙 更新时间:2023-11-03 15:09:40 25 4
gpt4 key购买 nike

以下是 pandas 提供的 USFederalHolidayCalendar 中的假期规则列表:

>>> from pandas.tseries.holiday import USFederalHolidayCalendar
>>> USFederalHolidayCalendar().rules
[Holiday: New Years Day (month=1, day=1, observance=<function nearest_workday at 0x7f735dbb5158>),
Holiday: Dr. Martin Luther King Jr. (month=1, day=1, offset=<DateOffset: kwds={'weekday': MO(+3)}>),
Holiday: Presidents Day (month=2, day=1, offset=<DateOffset: kwds={'weekday': MO(+3)}>),
Holiday: MemorialDay (month=5, day=31, offset=<DateOffset: kwds={'weekday': MO(-1)}>),
Holiday: July 4th (month=7, day=4, observance=<function nearest_workday at 0x7f735dbb5158>),
Holiday: Labor Day (month=9, day=1, offset=<DateOffset: kwds={'weekday': MO(+1)}>),
Holiday: Columbus Day (month=10, day=1, offset=<DateOffset: kwds={'weekday': MO(+2)}>),
Holiday: Veterans Day (month=11, day=11, observance=<function nearest_workday at 0x7f735dbb5158>),
Holiday: Thanksgiving (month=11, day=1, offset=<DateOffset: kwds={'weekday': TH(+4)}>),
Holiday: Christmas (month=12, day=25, observance=<function nearest_workday at 0x7f735dbb5158>)]

阵亡将士纪念日是MemorialDay,而所有其他节日的名称中都有空格,这是否有原因?

最佳答案

这已被报告为错误并已解决。 https://github.com/pandas-dev/pandas/issues/9760

关于python - 为什么在 pandas USFederalHolidayCalendar 中假期被编码为 MemorialDay?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44331764/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com