We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 655ca4e commit f46c394Copy full SHA for f46c394
pandas/tseries/holiday.py
@@ -260,7 +260,8 @@ class from pandas.tseries.offsets, default None
260
self.observance = observance
261
assert days_of_week is None or type(days_of_week) == tuple
262
self.days_of_week = days_of_week
263
- assert exclude_dates is None or type(exclude_dates) == DatetimeIndex
+ if exclude_dates is not None and type(exclude_dates) != DatetimeIndex:
264
+ raise ValueError("exclude_dates must be None or of type DatetimeIndex.")
265
self.exclude_dates = exclude_dates
266
267
def __repr__(self) -> str:
0 commit comments