pandera.engines.pandas_engine.PydanticModel#

class pandera.engines.pandas_engine.PydanticModel(model)[source]#

A pydantic model datatype applying to rows in a dataframe.

Attributes

auto_coerce

Whether to force coerce to be True in all cases

continuous

Whether the number data type is continuous.

type

Native pandas dtype boxed by the data type.

Methods

__init__

check

Check that pandera DataType are equivalent.

coerce

Coerce pandas dataframe with pydantic record model.

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.