Skip to content

Commit be8f61b

Browse files
author
Sebastian Goldmann
committed
Improved docstring offset class BusinessDay
1 parent f2eb667 commit be8f61b

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

pandas/_libs/tslibs/offsets.pyx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1899,6 +1899,9 @@ cdef class BusinessDay(BusinessMixin):
18991899
"""
19001900
DateOffset subclass representing possibly n business days.
19011901
1902+
This offset is commonly used in financial and business contexts where weekends
1903+
and holidays are excluded from date calculations.
1904+
19021905
Parameters
19031906
----------
19041907
n : int, default 1
@@ -1908,6 +1911,16 @@ cdef class BusinessDay(BusinessMixin):
19081911
offset : timedelta, default timedelta(0)
19091912
Time offset to apply.
19101913
1914+
Returns
1915+
-------
1916+
BusinessDay
1917+
A business day offset instance.
1918+
1919+
See Also
1920+
--------
1921+
CustomBusinessDay : A business day offset with custom holidays and weekmask.
1922+
DateOffset : The base class for all time-based offsets.
1923+
19111924
Examples
19121925
--------
19131926
You can use the parameter ``n`` to represent a shift of n business days.
@@ -1925,6 +1938,7 @@ cdef class BusinessDay(BusinessMixin):
19251938
>>> ts + pd.offsets.BusinessDay(normalize=True)
19261939
Timestamp('2022-12-12 00:00:00')
19271940
"""
1941+
19281942
_period_dtype_code = PeriodDtypeCode.B
19291943
_prefix = "B"
19301944
_attributes = tuple(["n", "normalize", "offset"])

0 commit comments

Comments
 (0)