Skip to content

Commit e21e725

Browse files
tuhinsharma121pmhatre1
authored andcommitted
DOC: Enforce Numpy Docstring Validation for pandas.Series.cat.codes (pandas-dev#58527)
* DOC: add SA01 for pandas.Series.cat.codes * DOC: remove SA01 for pandas.Series.cat.codes
1 parent 3d13864 commit e21e725

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

ci/code_checks.sh

-1
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
172172
-i "pandas.Series.cat.add_categories PR01,PR02" \
173173
-i "pandas.Series.cat.as_ordered PR01" \
174174
-i "pandas.Series.cat.as_unordered PR01" \
175-
-i "pandas.Series.cat.codes SA01" \
176175
-i "pandas.Series.cat.remove_categories PR01,PR02" \
177176
-i "pandas.Series.cat.remove_unused_categories PR01" \
178177
-i "pandas.Series.cat.rename_categories PR01,PR02" \

pandas/core/arrays/categorical.py

+6
Original file line numberDiff line numberDiff line change
@@ -2987,6 +2987,12 @@ def codes(self) -> Series:
29872987
"""
29882988
Return Series of codes as well as the index.
29892989
2990+
See Also
2991+
--------
2992+
Series.cat.categories : Return the categories of this categorical.
2993+
Series.cat.as_ordered : Set the Categorical to be ordered.
2994+
Series.cat.as_unordered : Set the Categorical to be unordered.
2995+
29902996
Examples
29912997
--------
29922998
>>> raw_cate = pd.Categorical(["a", "b", "c", "a"], categories=["a", "b"])

0 commit comments

Comments
 (0)