pandera.engines.pandas_engine.PythonDict

class pandera.engines.pandas_engine.PythonDict(generic_type=None)[source]

一种支持python泛型的数据类型。

属性

auto_coerce

在所有情况下是否强制转换为True

coercion_model

continuous

数字数据类型是否是连续的。

generic_type

special_type

方法

__init__(generic_type=None)[source]
check(pandera_dtype, data_container=None)[source]

检查数据容器是否具有预期类型。

Return type:

Union[bool, Iterable[bool]]

coerce(data_container)[source]

将数据容器强制转换为指定的数据类型。

Return type:

Union[Series, DataFrame]

coerce_value(value)[source]

将一个值强制转换为特定类型。

Return type:

Any

try_coerce(data_container)[source]

强制数据容器转换为数据类型, 如果强制转换失败,则引发 ParserError :raises: ParserError: 如果强制转换失败

Return type:

Union[Series, DataFrame]

__call__(data_container)[source]

将数据容器强制转换为数据类型。