From 496664db0f8067d92bb81482059464ca63ac58a4 Mon Sep 17 00:00:00 2001 From: Tuhin Sharma Date: Thu, 2 May 2024 17:12:20 +0530 Subject: [PATCH 1/2] DOC: add SA01 for pandas.Series.cat.codes --- pandas/core/arrays/categorical.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pandas/core/arrays/categorical.py b/pandas/core/arrays/categorical.py index 11dea697d9b93..d9bcfd0322d69 100644 --- a/pandas/core/arrays/categorical.py +++ b/pandas/core/arrays/categorical.py @@ -2987,6 +2987,12 @@ def codes(self) -> Series: """ Return Series of codes as well as the index. + See Also + -------- + Series.cat.categories : Return the categories of this categorical. + Series.cat.as_ordered : Set the Categorical to be ordered. + Series.cat.as_unordered : Set the Categorical to be unordered. + Examples -------- >>> raw_cate = pd.Categorical(["a", "b", "c", "a"], categories=["a", "b"]) From 93ad30f88f520a4a8759545f537405c369a10f68 Mon Sep 17 00:00:00 2001 From: Tuhin Sharma Date: Thu, 2 May 2024 17:13:32 +0530 Subject: [PATCH 2/2] DOC: remove SA01 for pandas.Series.cat.codes --- ci/code_checks.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/ci/code_checks.sh b/ci/code_checks.sh index 996f361e9440f..7a09138d74815 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -174,7 +174,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then -i "pandas.Series.cat.add_categories PR01,PR02" \ -i "pandas.Series.cat.as_ordered PR01" \ -i "pandas.Series.cat.as_unordered PR01" \ - -i "pandas.Series.cat.codes SA01" \ -i "pandas.Series.cat.remove_categories PR01,PR02" \ -i "pandas.Series.cat.remove_unused_categories PR01" \ -i "pandas.Series.cat.rename_categories PR01,PR02" \