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 f019a5c commit bdbb555Copy full SHA for bdbb555
pandas/tseries/holiday.py
@@ -340,10 +340,7 @@ def dates(
340
]
341
342
if self.exclude_dates:
343
- holiday_dates = DatetimeIndex(
344
- [hd for hd in holiday_dates if hd not in self.exclude_dates]
345
- )
346
-
+ holiday_dates = holiday_dates.difference(self.exclude_dates)
347
if return_name:
348
return Series(self.name, index=holiday_dates)
349
return holiday_dates
0 commit comments