IsNotIn
class IsNotIn(
column_names: ColumnNamesWithAltSpec | None = None,
on_missing_column: OnInvalidColumnSpec = 'ignore',
on_wrong_value: OnInvalidValueSpec = 'ignore',
values: ValuesSpec = field(kw_only=True),
tags: TagsSpec | None = field(default=None, kw_only=True),
on_wrong_type: OnInvalidColumnSpec = 'ignore',
)
Bases: InClassifier
Categories: dq-classifier
A boolean classifier that checks whether a value is not in a set of values. Applies to columns of any type.
Examples
IsNotIn(["status"], values={"void", "test"})
None in values tests for null membership:
IsNotIn(["status"], values={None})
Parameters
Columns to classify. Each entry is a column name, or a
(column, verdict_column) tuple naming the column the verdict
lands in; the two forms can be mixed. None (the default)
classifies every user column, skipping the types this classifier
does not support (see on_wrong_type). A verdict column that is
not named explicitly is the source column plus this classifier's
suffix (a column amount lands in amount_is_not_in).
on_missing_columnOnInvalidColumnSpec (Literal['ignore', 'fail'])What to do when a named column is not in the table:
"ignore" (the default) leaves it out, "fail" aborts the check.
on_wrong_valueOnInvalidValueSpec (Literal['ignore', 'fail'])What to do when a value cannot be evaluated against
this classifier: "ignore" (the default) yields a null verdict,
"fail" aborts the check.
valuesValuesSpec (frozenset[int | float | bool | str | date | time | datetime | timedelta | bytes | Decimal | None])Values to test membership against; a non-empty collection
(at least one). Include None to match nulls; duplicates are
removed.
Optional labels for this classifier. An operator given the same tag applies only to the classifiers carrying it; untagged operators apply to all of them.
on_wrong_typeOnInvalidColumnSpec (Literal['ignore', 'fail'])Fixed to "ignore": this classifier accepts every
column type, so there is no wrong type to report.
Methods
to_dictdef to_dict() -> dict[str, Any]
supported_dtypesdef supported_dtypes() -> frozenset