Skip to content

Commit 1b9163d

Browse files
Doc: fix SA01 errors for as_ordered and as_unordered (#57803)
fix SA01 errors for as_ordered and as_unordered
1 parent 085b919 commit 1b9163d

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

ci/code_checks.sh

-6
Original file line numberDiff line numberDiff line change
@@ -858,16 +858,12 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
858858
MSG='Partially validate docstrings (SA01)' ; echo $MSG
859859
$BASE_DIR/scripts/validate_docstrings.py --format=actions --errors=SA01 --ignore_functions \
860860
pandas.Categorical.__array__\
861-
pandas.Categorical.as_ordered\
862-
pandas.Categorical.as_unordered\
863861
pandas.Categorical.codes\
864862
pandas.Categorical.dtype\
865863
pandas.Categorical.from_codes\
866864
pandas.Categorical.ordered\
867865
pandas.CategoricalDtype.categories\
868866
pandas.CategoricalDtype.ordered\
869-
pandas.CategoricalIndex.as_ordered\
870-
pandas.CategoricalIndex.as_unordered\
871867
pandas.CategoricalIndex.codes\
872868
pandas.CategoricalIndex.ordered\
873869
pandas.DataFrame.__dataframe__\
@@ -1064,8 +1060,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
10641060
pandas.Series.backfill\
10651061
pandas.Series.bfill\
10661062
pandas.Series.cat\
1067-
pandas.Series.cat.as_ordered\
1068-
pandas.Series.cat.as_unordered\
10691063
pandas.Series.cat.codes\
10701064
pandas.Series.cat.ordered\
10711065
pandas.Series.copy\

pandas/core/arrays/categorical.py

+8
Original file line numberDiff line numberDiff line change
@@ -988,6 +988,10 @@ def as_ordered(self) -> Self:
988988
Categorical
989989
Ordered Categorical.
990990
991+
See Also
992+
--------
993+
as_unordered : Set the Categorical to be unordered.
994+
991995
Examples
992996
--------
993997
For :class:`pandas.Series`:
@@ -1019,6 +1023,10 @@ def as_unordered(self) -> Self:
10191023
Categorical
10201024
Unordered Categorical.
10211025
1026+
See Also
1027+
--------
1028+
as_ordered : Set the Categorical to be ordered.
1029+
10221030
Examples
10231031
--------
10241032
For :class:`pandas.Series`:

0 commit comments

Comments
 (0)