NotInBins
class NotInBins(column_name: ColumnNameSpec, bins: BinsCriteriaSpec)
Bases: CategoryCriteria
Categories: dq-operator
A category criteria that selects rows whose bin is not among the given
bins. Use with Filter, Select or Fail.
Examples
Filter(NotInBins(column_name="amount_bin", bins={0, 1, 2}))
The special bins catch the values that fell outside the scale:
NotInBins(
column_name="amount_bin",
bins={"none", "nan", "underflow", "overflow"},
)
Parameters
parameter
column_nameColumnNameSpec (str)Name of the column holding the bin index a
ScaleCategorizer produced.
parameter
binsBinsCriteriaSpec (frozenset[StrictInt | Literal['none', 'nan', 'underflow', 'overflow']])Bins to match; a non-empty set of bin indices (0 to 100) and/or
the special bins "none", "nan", "underflow" and "overflow".
Methods
method
to_dictdef to_dict() -> dict[str, Any]