From e8b44819da9bdc357dc8133d85fc6801e405642b Mon Sep 17 00:00:00 2001 From: Tuhin Sharma Date: Tue, 28 Jan 2025 12:24:27 +0530 Subject: [PATCH 1/2] DOC: fix PR02,SA01,ES01 for pandas.tseries.offsets.BDay and pandas.tseries.offsets.BusinessDay --- pandas/_libs/tslibs/offsets.pyx | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/pandas/_libs/tslibs/offsets.pyx b/pandas/_libs/tslibs/offsets.pyx index 36b431974c121..ac73c25f4bb25 100644 --- a/pandas/_libs/tslibs/offsets.pyx +++ b/pandas/_libs/tslibs/offsets.pyx @@ -1838,7 +1838,12 @@ cdef class BusinessDay(BusinessMixin): """ DateOffset subclass representing possibly n business days. - Parameters + This class is used to perform date arithmetic involving business days. + Business days are defined by default as weekdays (Monday to Friday), + excluding weekends, but can be customized to exclude or include specific + holidays by combining with a ``CustomBusinessDay``. + + Attributes ---------- n : int, default 1 The number of days represented. @@ -1847,6 +1852,13 @@ cdef class BusinessDay(BusinessMixin): offset : timedelta, default timedelta(0) Time offset to apply. + See Also + -------- + tseries.offsets.CustomBusinessDay : A customizable version of + `BusinessDay` that allows for the inclusion of holidays and other + non-standard business day definitions. + date_range : Generate a range of dates with a specific frequency. + Examples -------- You can use the parameter ``n`` to represent a shift of n business days. From 8af4076b6b6206b650f9d6766fcb25d3a305da26 Mon Sep 17 00:00:00 2001 From: Tuhin Sharma Date: Tue, 28 Jan 2025 12:24:46 +0530 Subject: [PATCH 2/2] DOC: fix PR02,SA01,ES01 for pandas.tseries.offsets.BDay and pandas.tseries.offsets.BusinessDay --- ci/code_checks.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/ci/code_checks.sh b/ci/code_checks.sh index 2d0fcce47d2a5..f854ed9803a51 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -83,7 +83,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then -i "pandas.core.groupby.SeriesGroupBy.plot PR02" \ -i "pandas.core.resample.Resampler.quantile PR01,PR07" \ -i "pandas.core.resample.Resampler.transform PR01,RT03,SA01" \ - -i "pandas.tseries.offsets.BDay PR02,SA01" \ -i "pandas.tseries.offsets.BQuarterBegin.is_on_offset GL08" \ -i "pandas.tseries.offsets.BQuarterBegin.n GL08" \ -i "pandas.tseries.offsets.BQuarterBegin.normalize GL08" \ @@ -102,7 +101,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then -i "pandas.tseries.offsets.BYearEnd.month GL08" \ -i "pandas.tseries.offsets.BYearEnd.n GL08" \ -i "pandas.tseries.offsets.BYearEnd.normalize GL08" \ - -i "pandas.tseries.offsets.BusinessDay PR02,SA01" \ -i "pandas.tseries.offsets.BusinessDay.calendar GL08" \ -i "pandas.tseries.offsets.BusinessDay.holidays GL08" \ -i "pandas.tseries.offsets.BusinessDay.is_on_offset GL08" \