traveler.core.array_tools.CategoricalArray.from_values_predefined#
- classmethod CategoricalArray.from_values_predefined(values, mark, store)[source]#
Create categorical codes from values using categories in a store.
- Parameters:
- Returns:
Encoded values using the store’s predefined categories.
- Return type:
- Raises:
KeyError – If the requested category group is absent from the store.
ValueError – If any value is not present in the predefined categories.