Skip to content

details on weekday argument for DateOffset docs #54332

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

Merged
merged 9 commits into from
Aug 25, 2023
22 changes: 22 additions & 0 deletions pandas/_libs/tslibs/offsets.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -1465,6 +1465,28 @@ class DateOffset(RelativeDeltaOffset, metaclass=OffsetMeta):
normalize : bool, default False
Whether to round the result of a DateOffset addition down to the
previous midnight.
weekday : int {0, 1, ..., 6}, default 0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can this go before kwds? that should typically be the last argument

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.


A specific integer for the day of the week.

- 0 is Monday
- 1 is Tuesday
- 2 is Wednesday
- 3 is Thursday
- 4 is Friday
- 5 is Saturday
- 6 is Sunday

Instead Weekday type from dateutil.relativedelta can be used.

- MO is Monday
- TU is Tuesday
- WE is Wednesday
- TH is Thursday
- FR is Friday
- SA is Saturday
- SU is Sunday.

**kwds
Temporal parameter that add to or replace the offset value.

Expand Down