pandera.engines.polars_engine.Decimal¶
- class pandera.engines.polars_engine.Decimal(precision=28, scale=0)[source]¶
Polars decimal data type.
Attributes
auto_coerce
Whether to force coerce to be True in all cases
continuous
Whether the number data type is continuous.
exact
Whether the data type is an exact representation of a number.
precision
The number of significant digits that the decimal type can represent.
rounding
The rounding mode supported by the Python
decimal.Decimal
class.scale
The number of digits after the decimal point.
Methods
- check(pandera_dtype, data_container=None)[source]¶
Check that pandera
DataType
are equivalent.- Parameters:
pandera_dtype (
DataType
) – ExpectedDataType
.data_container (
Union
[LazyFrame
,PolarsData
,None
]) – Data container, used by data types that require the actual data for validation.
- Return type:
- Returns:
boolean scalar or iterable of boolean scalars, indicating which elements passed the check.
- classmethod from_parametrized_dtype(polars_dtype)[source]¶
Convert a
polars.Decimal
to a Panderapandera.engines.polars_engine.Decimal
.