woodwork.logical_types.Categorical#

class woodwork.logical_types.Categorical(encoding=None)[source]#

Represents Logical Types that contain unordered discrete values that fall into one of a set of possible values. Has ‘category’ as a standard tag.

Examples

["red", "green", "blue"]
["produce", "dairy", "bakery"]
[3, 1, 2]
__init__(encoding=None)[source]#

Methods

__init__([encoding])

transform(series[, null_invalid_values])

Converts the series dtype to match the logical type's if it is different.

validate(series, *args, **kwargs)

Validates that a logical type is consistent with the series dtype.

Attributes

primary_dtype

standard_tags

type_string