diff --git a/ci/code_checks.sh b/ci/code_checks.sh index c4e43b88a0097..1beeedc1831e3 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -867,16 +867,12 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then $BASE_DIR/scripts/validate_docstrings.py --format=actions --errors=SA01 --ignore_functions \ pandas.BooleanDtype\ pandas.Categorical.__array__\ - pandas.Categorical.as_ordered\ - pandas.Categorical.as_unordered\ pandas.Categorical.codes\ pandas.Categorical.dtype\ pandas.Categorical.from_codes\ pandas.Categorical.ordered\ pandas.CategoricalDtype.categories\ pandas.CategoricalDtype.ordered\ - pandas.CategoricalIndex.as_ordered\ - pandas.CategoricalIndex.as_unordered\ pandas.CategoricalIndex.codes\ pandas.CategoricalIndex.ordered\ pandas.DataFrame.__dataframe__\ @@ -1073,8 +1069,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then pandas.Series.backfill\ pandas.Series.bfill\ pandas.Series.cat\ - pandas.Series.cat.as_ordered\ - pandas.Series.cat.as_unordered\ pandas.Series.cat.codes\ pandas.Series.cat.ordered\ pandas.Series.copy\ diff --git a/pandas/core/arrays/categorical.py b/pandas/core/arrays/categorical.py index af8dc08c1ec26..da1665bd86f45 100644 --- a/pandas/core/arrays/categorical.py +++ b/pandas/core/arrays/categorical.py @@ -988,6 +988,10 @@ def as_ordered(self) -> Self: Categorical Ordered Categorical. + See Also + -------- + as_unordered : Set the Categorical to be unordered. + Examples -------- For :class:`pandas.Series`: @@ -1019,6 +1023,10 @@ def as_unordered(self) -> Self: Categorical Unordered Categorical. + See Also + -------- + as_ordered : Set the Categorical to be ordered. + Examples -------- For :class:`pandas.Series`: