-
- Notifications
You must be signed in to change notification settings - Fork 19.4k
DOC/ENH: Holiday exclusion argument #61600
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
f054afb 5a809e2 891b442 aa08735 f019a5c bdbb555 5bca8c7 655ca4e f46c394 27cca3d a9a745c 7710e43 5cfd599 2d9e4c5 File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| | @@ -6,7 +6,6 @@ | |
| ) | ||
| from typing import ( | ||
| TYPE_CHECKING, | ||
| Any, | ||
| ) | ||
| import warnings | ||
| | ||
| | @@ -172,7 +171,7 @@ def __init__( | |
| start_date=None, | ||
| end_date=None, | ||
| days_of_week: tuple | None = None, | ||
| exclude_dates: list[Any] | None = None, | ||
| exclude_dates: list[Timestamp] | None = None, | ||
| ) -> None: | ||
| """ | ||
| Parameters | ||
| | @@ -264,11 +263,10 @@ class from pandas.tseries.offsets, default None | |
| self.observance = observance | ||
| assert days_of_week is None or type(days_of_week) == tuple | ||
| Contributor Author There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should I also switch this to throw a Member There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A separate PR would be better, thanks. Contributor Author There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For this, should I open a new issue? Or just make another PR? Member There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just another PR is fine | ||
| self.days_of_week = days_of_week | ||
| self.exclude_dates = ( | ||
| [Timestamp(ex) for ex in exclude_dates] | ||
| if exclude_dates is not None | ||
| else exclude_dates | ||
| assert exclude_dates is None or all( | ||
| type(ex) == Timestamp for ex in exclude_dates | ||
| ) | ||
| self.exclude_dates = exclude_dates | ||
| | ||
| def __repr__(self) -> str: | ||
| info = "" | ||
| | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, can we type this as
exclude_dates: DatetimeIndex | None = None,?