pandera.engines.pandas_engine.Decimal¶
- class pandera.engines.pandas_engine.Decimal(precision=28, scale=0, rounding=None)[source]¶
Semantic representation of a
decimal.Decimal.Note
decimal.Decimalis especially useful when exporting a pandas DataFrame to parquet files via pyarrow. Pyarrow will automatically convert the decimal objects contained in the object series to the corresponding parquet Decimal type.Attributes
auto_coerceWhether to force coerce to be True in all cases
continuousWhether the number data type is continuous.
exactWhether the data type is an exact representation of a number.
precisionThe number of significant digits that the decimal type can represent.
scaleThe number of digits after the decimal point.
typeNative pandas dtype boxed by the data type.
roundingThe rounding mode supported by the Python
decimal.Decimalclass.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.