polars.Enum#

class polars.Enum(categories: Series | Iterable[str])[source]#

A fixed set categorical encoding of a set of strings.

Warning

This functionality is considered unstable. It is a work-in-progress feature and may not always work as expected. It may be changed at any point without it being considered a breaking change.

__init__(categories: Series | Iterable[str])[source]#

A fixed set categorical encoding of a set of strings.

Parameters:
categories

Valid categories in the dataset.

Methods

__init__(categories)

A fixed set categorical encoding of a set of strings.

base_type()

Return this DataType's fundamental/root type class.

is_(other)

Check if this DataType is the same as another DataType.

is_decimal()

Check whether the data type is a decimal type.

is_float()

Check whether the data type is a temporal type.

is_integer()

Check whether the data type is an integer type.

is_nested()

Check whether the data type is a nested type.

is_not(other)

Check if this DataType is NOT the same as another DataType.

is_numeric()

Check whether the data type is a numeric type.

is_signed_integer()

Check whether the data type is a signed integer type.

is_temporal()

Check whether the data type is a temporal type.

is_unsigned_integer()

Check whether the data type is an unsigned integer type.

Attributes

categories