diff --git a/doc/source/reference/arrays.rst b/doc/source/reference/arrays.rst index fe65364896f54..93b56d1b48c02 100644 --- a/doc/source/reference/arrays.rst +++ b/doc/source/reference/arrays.rst @@ -539,6 +539,21 @@ To create a Series of dtype ``category``, use ``cat = s.astype(dtype)`` or If the :class:`Series` is of dtype :class:`CategoricalDtype`, ``Series.cat`` can be used to change the categorical data. See :ref:`api.series.cat` for more. +More methods are available on :class:`Categorical`: + +.. autosummary:: + :toctree: api/ + + Categorical.as_ordered + Categorical.as_unordered + Categorical.set_categories + Categorical.rename_categories + Categorical.reorder_categories + Categorical.add_categories + Categorical.remove_categories + Categorical.remove_unused_categories + Categorical.map + .. _api.arrays.sparse: Sparse diff --git a/pandas/core/arrays/categorical.py b/pandas/core/arrays/categorical.py index 46b76e2365df9..e3f94f1ecb798 100644 --- a/pandas/core/arrays/categorical.py +++ b/pandas/core/arrays/categorical.py @@ -291,6 +291,15 @@ class Categorical(NDArrayBackedExtensionArray, PandasObject, ObjectStringArrayMi Methods ------- from_codes + as_ordered + as_unordered + set_categories + rename_categories + reorder_categories + add_categories + remove_categories + remove_unused_categories + map __array__ Raises