From 48709ccb3b679a6d8a3880f04039398e3a837ad9 Mon Sep 17 00:00:00 2001 From: KeiOshima Date: Thu, 18 Apr 2024 23:55:54 -0400 Subject: [PATCH 1/2] Fixing doc string for DatetimeIndex.month and DatetimeIndex.year --- ci/code_checks.sh | 2 -- pandas/core/arrays/datetimes.py | 10 ++++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ci/code_checks.sh b/ci/code_checks.sh index 211af5999c975..92df7d2c88db8 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -126,7 +126,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then -i "pandas.DatetimeIndex.is_leap_year SA01" \ -i "pandas.DatetimeIndex.microsecond SA01" \ -i "pandas.DatetimeIndex.minute SA01" \ - -i "pandas.DatetimeIndex.month SA01" \ -i "pandas.DatetimeIndex.month_name SA01" \ -i "pandas.DatetimeIndex.nanosecond SA01" \ -i "pandas.DatetimeIndex.quarter SA01" \ @@ -140,7 +139,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then -i "pandas.DatetimeIndex.to_pydatetime RT03,SA01" \ -i "pandas.DatetimeIndex.tz SA01" \ -i "pandas.DatetimeIndex.tz_convert RT03" \ - -i "pandas.DatetimeIndex.year SA01" \ -i "pandas.DatetimeTZDtype SA01" \ -i "pandas.DatetimeTZDtype.tz SA01" \ -i "pandas.DatetimeTZDtype.unit SA01" \ diff --git a/pandas/core/arrays/datetimes.py b/pandas/core/arrays/datetimes.py index d446407ec3d01..f04dce6e28c74 100644 --- a/pandas/core/arrays/datetimes.py +++ b/pandas/core/arrays/datetimes.py @@ -1533,6 +1533,11 @@ def isocalendar(self) -> DataFrame: """ The year of the datetime. + See Also + -------- + DatetimeIndex.month: The month as January=1, December=12. + DatetimeIndex.day: The day of the datetime. + Examples -------- >>> datetime_series = pd.Series( @@ -1556,6 +1561,11 @@ def isocalendar(self) -> DataFrame: """ The month as January=1, December=12. + See Also + -------- + DatetimeIndex.year: The year of the datetime. + DatetimeIndex.day: The day of the datetime. + Examples -------- >>> datetime_series = pd.Series( From f82a45f6e6cd28cb113b2778269000ec096e5257 Mon Sep 17 00:00:00 2001 From: KeiOshima Date: Fri, 19 Apr 2024 00:20:52 -0400 Subject: [PATCH 2/2] fixing at pandas.Series code_checks --- ci/code_checks.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/ci/code_checks.sh b/ci/code_checks.sh index 92df7d2c88db8..5f95add424533 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -324,7 +324,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then -i "pandas.Series.dt.microsecond SA01" \ -i "pandas.Series.dt.microseconds SA01" \ -i "pandas.Series.dt.minute SA01" \ - -i "pandas.Series.dt.month SA01" \ -i "pandas.Series.dt.month_name PR01,PR02,SA01" \ -i "pandas.Series.dt.nanosecond SA01" \ -i "pandas.Series.dt.nanoseconds SA01" \ @@ -343,7 +342,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then -i "pandas.Series.dt.tz_convert PR01,PR02,RT03" \ -i "pandas.Series.dt.tz_localize PR01,PR02" \ -i "pandas.Series.dt.unit GL08" \ - -i "pandas.Series.dt.year SA01" \ -i "pandas.Series.dtype SA01" \ -i "pandas.Series.empty GL08" \ -i "pandas.Series.eq PR07,SA01" \