pandera.engines.pandas_engine.Category¶
- class pandera.engines.pandas_engine.Category(categories=None, ordered=False)[source]¶
Semantic representation of a
pandas.CategoricalDtype.Attributes
auto_coerceWhether to force coerce to be True in all cases
categoriescontinuousWhether the number data type is continuous.
orderedtypeNative pandas dtype boxed by the data type.
Methods
- check(pandera_dtype, data_container=None)[source]¶
Check that pandera
DataTypeare equivalent.- Parameters:
- Return type:
- Returns:
boolean scalar or iterable of boolean scalars, indicating which elements passed the check.
- classmethod from_parametrized_dtype(cat)[source]¶
Convert a categorical to a Pandera
pandera.dtypes.pandas_engine.Category.