pandera.infer_schema

pandera.infer_schema(pandas_obj)[source]

Infer schema for pandas DataFrame or Series object.

Parameters

pandas_obj (Union[DataFrame, Series]) – DataFrame or Series object to infer.

Return type

Union[DataFrameSchema, SeriesSchema]

Returns

DataFrameSchema or SeriesSchema

Raises

TypeError if pandas_obj is not expected type.