Skip to content

DOC: Correct description of day_opt in shift_month #24585

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
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion pandas/_libs/tslibs/offsets.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -847,11 +847,15 @@ def shift_month(stamp: datetime, months: int,
----------
stamp : datetime or Timestamp
months : int
day_opt : None, 'start', 'end', or an integer
day_opt : None, 'start', 'end', 'business_start', 'business_end', or int
None: returned datetimelike has the same day as the input, or the
last day of the month if the new month is too short
'start': returned datetimelike has day=1
'end': returned datetimelike has day on the last day of the month
'business_start': returned datetimelike has day on the first
business day of the month
'business_end': returned datetimelike has day on the last
business day of the month
int: returned datetimelike has day equal to day_opt

Returns
Expand Down