pandera.dtypes.Category#

class pandera.dtypes.Category(categories=None, ordered=False)[source]#

Semantic representation of a categorical data type.

Attributes

categories

continuous

Whether the number data type is continuous.

ordered

Methods

__init__

check

Check that pandera DataType are equivalent.

coerce

Coerce data container to the data type.

coerce_value

Coerce an value to a particular type.

try_coerce

Coerce data container to the data type, raises a ParserError if the coercion fails :raises: ParserError: if coercion fails

__call__

Coerce data container to the data type.