ak.is_categorical#

Defined in awkward.operations.ak_is_categorical on line 12.

ak.is_categorical(array)#

Returns True if the array is categorical.

If the array is categorical (contains ak.contents.IndexedArray or ak.contents.IndexedOptionArray labeled with parameter "__array__" = "categorical"), then this function returns True; otherwise, it returns False.

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

Parameters:

array – Array-like data (anything ak.to_layout recognizes).

Returns:

True if array is categorical, False otherwise.