ak.from_categorical

Defined in awkward.behaviors.categorical on line 306.

ak.from_categorical(array, highlevel=True)
Parameters
  • array – Awkward Array from which to remove the ‘categorical’ parameter.

  • highlevel (bool) – If True, return an ak.Array; otherwise, return a low-level ak.layout.Content subclass.

This function replaces categorical data with non-categorical data (by removing the label that declares it as such).

This is a metadata-only operation; the running time does not scale with the size of the dataset. (Conversion to categorical is expensive; conversion from categorical is cheap.)

See also ak.is_categorical, ak.categories, ak.to_categorical, ak.from_categorical.