diff --git a/ci/code_checks.sh b/ci/code_checks.sh index 6469f39e7c332..f1e7f6d477906 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -1458,8 +1458,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then MSG='Partially validate docstrings (PR01)' ; echo $MSG $BASE_DIR/scripts/validate_docstrings.py --format=actions --errors=PR01 --ignore_functions \ - pandas.Categorical\ - pandas.Categorical.__array__\ pandas.CategoricalIndex.equals\ pandas.CategoricalIndex.map\ pandas.DataFrame.at_time\ diff --git a/pandas/core/arrays/categorical.py b/pandas/core/arrays/categorical.py index d1dba024e85c5..886fe4594c17b 100644 --- a/pandas/core/arrays/categorical.py +++ b/pandas/core/arrays/categorical.py @@ -276,6 +276,11 @@ class Categorical(NDArrayBackedExtensionArray, PandasObject, ObjectStringArrayMi provided). dtype : CategoricalDtype An instance of ``CategoricalDtype`` to use for this categorical. + fastpath : bool + The 'fastpath' keyword in Categorical is deprecated and will be + removed in a future version. Use Categorical.from_codes instead. + copy : bool, default True + Whether to copy if the codes are unchanged. Attributes ---------- @@ -1657,6 +1662,11 @@ def __array__(self, dtype: NpDtype | None = None) -> np.ndarray: """ The numpy array interface. + Parameters + ---------- + dtype : np.dtype or None + Specifies the the dtype for the array. + Returns ------- numpy.array