ak.categories ------------- .. py:module: ak.categories Defined in `awkward.operations.ak_categories `__ on `line 10 `__. .. py:function:: ak.categories(array, highlevel=True) :param array: Array-like data (anything :py:obj:`ak.to_layout` recognizes). :param highlevel: If True, return an :py:obj:`ak.Array`; otherwise, return a low-level :py:obj:`ak.contents.Content` subclass. :type highlevel: bool If the ``array`` is categorical (contains :py:obj:`ak.contents.IndexedArray` or :py:obj:`ak.contents.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`.