ak.categories#
Defined in awkward.operations.ak_categories on line 6.
- ak.categories(array, highlevel=True)#
- Parameters
array – Array-like data (anything
ak.to_layout
recognizes).highlevel (bool) – If True, return an
ak.Array
; otherwise, return a low-levelak.contents.Content
subclass.
If the array
is categorical (contains ak.contents.IndexedArray
or
ak.contents.IndexedOptionArray
labeled with parameter
"__array__" = "categorical"
), then this function returns its categories.
See also ak.is_categorical
, ak.to_categorical
, ak.from_categorical
.