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_coerceWhether to force coerce to be True in all cases
continuousWhether the number data type is continuous.
typeNative 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.
- coerce(data_container)[source]¶
Coerce pandas dataframe with pydantic record model.
- Return type:
Union[Series,DataFrame]