Skip to content

Commit 3a44fc3

Browse files
DOC: fix PR01,ES01 for pandas.Series.cat.as_unordered
1 parent 94a7c14 commit 3a44fc3

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

ci/code_checks.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
8484
-i "pandas.RangeIndex.stop SA01" \
8585
-i "pandas.Series.cat.add_categories PR01,PR02" \
8686
-i "pandas.Series.cat.as_ordered PR01" \
87-
-i "pandas.Series.cat.as_unordered PR01" \
8887
-i "pandas.Series.cat.remove_categories PR01,PR02" \
8988
-i "pandas.Series.cat.remove_unused_categories PR01" \
9089
-i "pandas.Series.cat.rename_categories PR01,PR02" \

pandas/core/arrays/categorical.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1008,6 +1008,18 @@ def as_unordered(self) -> Self:
10081008
"""
10091009
Set the Categorical to be unordered.
10101010
1011+
This method sets the `ordered` attribute of the Categorical to `False`.
1012+
An unordered Categorical does not have any meaningful ordering among
1013+
its categories, which can be useful when the order of the categories
1014+
is not relevant for analysis or visualization.
1015+
1016+
Parameters
1017+
----------
1018+
*args : iterable, optional
1019+
Positional arguments passed into `func`.
1020+
**kwargs : dict, optional
1021+
A dictionary of keyword arguments passed into `func`.
1022+
10111023
Returns
10121024
-------
10131025
Categorical

0 commit comments

Comments
 (0)