ak.categories
-------------

Defined in `awkward.behaviors.categorical <https://github.com/scikit-hep/awkward-1.0/blob/80bbef0738a6b7928333d7c705ee1b359991de5b/src/awkward/behaviors/categorical.py>`__ on `line 135 <https://github.com/scikit-hep/awkward-1.0/blob/80bbef0738a6b7928333d7c705ee1b359991de5b/src/awkward/behaviors/categorical.py#L135>`__.

.. py:function:: ak.categories(array, highlevel=True)


    :param array: A possibly-categorical Awkward Array.
    :param highlevel: If True, return an :py:obj:`ak.Array`; otherwise, return
                  a low-level :py:obj:`ak.layout.Content` subclass.
    :type highlevel: bool

If the ``array`` is categorical (contains :py:obj:`ak.layout.IndexedArray` or
:py:obj:`ak.layout.IndexedOptionArray` labeled with parameter
``"__array__" = "categorical"``), then this function returns its categories.

See also :py:obj:`ak.is_categorical`, :py:obj:`ak.to_categorical`, :py:obj:`ak.from_categorical`.

