You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
USFederalHolidayCalendar().holidays(start_date, end_date) raises an error if the time range queried is from 2018 or before. Namely, the TypeError: Invalid comparison between dtype=datetime64[ns] and Timestamp error is raised, caused by the call rule.dates(start, end, return_name=True) in tseries\holiday.py for the Juneteenth holiday.
This behaviour was seen in both Pandas 2.0.1 and 2.0.3.
Expected Behavior
A list of all the holidays in the time range should be outputted, with Juneteenth missing since it wasn't observed yet.
Pandas version checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
Issue Description
USFederalHolidayCalendar().holidays(start_date, end_date)
raises an error if the time range queried is from 2018 or before. Namely, theTypeError: Invalid comparison between dtype=datetime64[ns] and Timestamp
error is raised, caused by the callrule.dates(start, end, return_name=True)
in tseries\holiday.py for the Juneteenth holiday.This behaviour was seen in both Pandas 2.0.1 and 2.0.3.
Expected Behavior
A list of all the holidays in the time range should be outputted, with Juneteenth missing since it wasn't observed yet.
Installed Versions
commit : 37ea63d
python : 3.10.11.final.0
python-bits : 64
OS : Windows
OS-release : 10
Version : 10.0.19045
machine : AMD64
processor : Intel64 Family 6 Model 140 Stepping 1, GenuineIntel
byteorder : little
LC_ALL : None
LANG : None
LOCALE : English_Israel.1252
pandas : 2.0.1
numpy : 1.24.3
pytz : 2023.3
dateutil : 2.8.2
setuptools : 57.5.0
pip : 22.3.1
Cython : 0.29.36
pytest : 7.3.1
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : 3.1.2
lxml.etree : 4.9.3
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 3.1.2
IPython : None
pandas_datareader: None
bs4 : 4.12.2
bottleneck : None
brotli : None
fastparquet : None
fsspec : 2023.6.0
gcsfs : 2023.6.0
matplotlib : 3.7.2
numba : None
numexpr : 2.8.4
odfpy : None
openpyxl : 3.1.2
pandas_gbq : 0.19.2
pyarrow : 12.0.1
pyreadstat : None
pyxlsb : None
s3fs : None
scipy : 1.10.1
snappy : None
sqlalchemy : None
tables : 3.8.0
tabulate : None
xarray : 2023.6.0
xlrd : 2.0.1
zstandard : None
tzdata : 2023.3
qtpy : None
pyqt5 : None
The text was updated successfully, but these errors were encountered: