Skip to main content
Version: 1.7.0

IsPositiveOrZero

class IsPositiveOrZero(
column_names: str | tuple[str, str | None] | Annotated[list[str], <class 'Strict'>] | Annotated[list[tuple[str, str | None]], <class 'Strict'>] | NoneType = None,
on_missing_column: Literal['ignore', 'fail'] = 'ignore',
on_wrong_type: Literal['ignore', 'fail'] = 'ignore',
tags: str | list[str] | NoneType = None,
)

Bases: BoolClassifier

Categories: dq-classifier

A boolean classifier that checks if a numeric value is positive or zero.

Initializes the IsPositiveOrZero classifier.

Parameters

parameter
column_names

The column(s) to check.

parameter
on_missing_column

What to do if a column name is missing.

parameter
on_wrong_type

Behavior when a column’s type is incompatible with the classifier.

parameter
tags

Optional tags for the classifier.

Properties

property
column_nameslist[tuple[str, str | None]] | None

Returns the list of columns the classifier applies to, including optional destination column names.

property
on_missing_columnLiteral['ignore', 'fail']

Returns what do if the column is missing.

property
on_wrong_typeLiteral['ignore', 'fail']

Returns what do if the column type is incompatible with the classifier.

property
on_wrong_valueLiteral['ignore', 'fail']

Returns what do if the column type is incompatible with the classifier.

property
tagslist[str] | None

Returns the list of tags associated with the classifier.

Methods

supported_dtypes
def supported_dtypes() -> FrozenSet[Type]

Returns the set of data types supported by IsPositiveOrZero classifier.