pandera.dtypes.Decimal#

class pandera.dtypes.Decimal(precision=28, scale=0, rounding=None)[source]#

Semantic representation of a 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.

scale

The number of digits after the decimal point.

type

rounding

The rounding mode supported by the Python decimal.Decimal class.

Methods

__init__

check

Check that pandera DataType are equivalent.

coerce

Coerce data container to the data type.

coerce_value

Coerce an value to a particular type.

try_coerce

Coerce data container to the data type, raises a ParserError if the coercion fails :raises: ParserError: if coercion fails

__call__

Coerce data container to the data type.