From 373bb3a45c746157dfda0699e6ccd31f7dfd418a Mon Sep 17 00:00:00 2001 From: Tuhin Sharma Date: Wed, 16 Oct 2024 23:48:48 +0530 Subject: [PATCH 1/2] DOC: fix SA01 for pandas.tseries.offsets.SemiMonthBegin --- ci/code_checks.sh | 1 - pandas/_libs/tslibs/offsets.pyx | 7 +++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ci/code_checks.sh b/ci/code_checks.sh index 1974c98a1d1ff..5bb46b61f53c1 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -303,7 +303,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then -i "pandas.tseries.offsets.Second.is_on_offset GL08" \ -i "pandas.tseries.offsets.Second.n GL08" \ -i "pandas.tseries.offsets.Second.normalize GL08" \ - -i "pandas.tseries.offsets.SemiMonthBegin SA01" \ -i "pandas.tseries.offsets.SemiMonthBegin.day_of_month GL08" \ -i "pandas.tseries.offsets.SemiMonthBegin.is_on_offset GL08" \ -i "pandas.tseries.offsets.SemiMonthBegin.n GL08" \ diff --git a/pandas/_libs/tslibs/offsets.pyx b/pandas/_libs/tslibs/offsets.pyx index 4db96fbaa3aad..762a023ec2d52 100644 --- a/pandas/_libs/tslibs/offsets.pyx +++ b/pandas/_libs/tslibs/offsets.pyx @@ -3380,6 +3380,13 @@ cdef class SemiMonthBegin(SemiMonthOffset): day_of_month : int, {1, 3,...,27}, default 15 A specific integer for the day of the month. + See Also + -------- + tseries.offsets.SemiMonthEnd : Two DateOffset's per month repeating on the last day + of the month & day_of_month. + tseries.offsets.MonthEnd : Offset to the last calendar day of the month. + tseries.offsets.MonthBegin : Offset to the first calendar day of the month. + Examples -------- >>> ts = pd.Timestamp(2022, 1, 1) From da20601614a220d34536f78dcaca6803af47a78a Mon Sep 17 00:00:00 2001 From: Tuhin Sharma Date: Thu, 17 Oct 2024 11:23:00 +0530 Subject: [PATCH 2/2] DOC: fix ES01 for pandas.tseries.offsets.SemiMonthBegin --- pandas/_libs/tslibs/offsets.pyx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pandas/_libs/tslibs/offsets.pyx b/pandas/_libs/tslibs/offsets.pyx index 762a023ec2d52..7569f8e8864a0 100644 --- a/pandas/_libs/tslibs/offsets.pyx +++ b/pandas/_libs/tslibs/offsets.pyx @@ -3371,6 +3371,10 @@ cdef class SemiMonthBegin(SemiMonthOffset): """ Two DateOffset's per month repeating on the first day of the month & day_of_month. + This offset moves dates to the first day of the month and an additional specified + day (typically the 15th by default), useful in scenarios where bi-monthly processing + occurs on set days. + Attributes ---------- n : int, default 1