Skip to content

Commit bdbb555

Browse files
committed
updated Holiday.dates() to use difference method
1 parent f019a5c commit bdbb555

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

pandas/tseries/holiday.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -340,10 +340,7 @@ def dates(
340340
]
341341

342342
if self.exclude_dates:
343-
holiday_dates = DatetimeIndex(
344-
[hd for hd in holiday_dates if hd not in self.exclude_dates]
345-
)
346-
343+
holiday_dates = holiday_dates.difference(self.exclude_dates)
347344
if return_name:
348345
return Series(self.name, index=holiday_dates)
349346
return holiday_dates

0 commit comments

Comments
 (0)