Skip to content

DOC: add missing parameters to offsets classes: BYearEnd, BusinessHour, WeekOfMonth #53183

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
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
16 changes: 15 additions & 1 deletion pandas/_libs/tslibs/offsets.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -1714,6 +1714,8 @@ cdef class BusinessHour(BusinessMixin):
Start time of your custom business hour in 24h format.
end : str, time, or list of str/time, default: "17:00"
End time of your custom business hour in 24h format.
offset : timedelta, default timedelta(0)
Time offset to apply.

Examples
--------
Expand Down Expand Up @@ -2243,6 +2245,15 @@ cdef class BYearEnd(YearOffset):
"""
DateOffset increments between the last business day of the year.

Parameters
----------
n : int, default 1
The number of years represented.
normalize : bool, default False
Normalize start/end dates to midnight before generating date range.
month : int, default 1
Copy link
Member

Choose a reason for hiding this comment

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

ah missed this, the default is actually 12, not 1 - fancy opening a follow-up to fix this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you, @MarcoGorelli. I will open a new pr, add missing parameters to some classes and correct the default value for month.

A specific integer for the month of the year.

Examples
--------
>>> from pandas.tseries.offsets import BYearEnd
Expand Down Expand Up @@ -3073,7 +3084,10 @@ cdef class WeekOfMonth(WeekOfMonthMixin):

Parameters
----------
n : int
n : int, default 1
The number of months represented.
normalize : bool, default False
Normalize start/end dates to midnight before generating date range.
week : int {0, 1, 2, 3, ...}, default 0
A specific integer for the week of the month.
e.g. 0 is 1st week of month, 1 is the 2nd week, etc.
Expand Down