Skip to content

Detectors

RangeValueDetector

__init__

__init__(
    min_val: float | int | datetime | str,
    max_val: float | int | datetime | str,
) -> None

Detect values within a range.

Parameters:

Name Type Description Default
min_val float | int | datetime | str

The minimum value of the range.

required
max_val float | int | datetime | str

The maximum value of the range.

required

RareCategoryDetector

__init__

__init__(min_occurrences: int = 1) -> None

Detect rare categories.

Parameters:

Name Type Description Default
min_occurrences int

The minimum number of occurrences for a category to avoid detection.

1

SpecialValuesDetector

__init__

__init__(values: Sequence) -> None

Detect specific given values.

Parameters:

Name Type Description Default
values Sequence

The sequence of values to be detected.

required

QuantileTailsDetector

__init__

__init__(
    quantile: float = 0.005, side: str | Side = BOTH
) -> None

Detect values in the tails of the data distribution.

Parameters:

Name Type Description Default
quantile float

The quantile defining the tails. Must be between 0 and 1.

0.005
side str | Side

The side of the distribution to consider. Should be a Side object or a string representing a Side.

BOTH

ThresholdCategoryDetector

__init__

__init__(threshold: float = 0.99) -> None

Detect the lowest frequency categories in order to avoid detection of a given minimal fraction of the total number of categories.

Parameters:

Name Type Description Default
threshold float

The minimal fraction of the total number of categories to avoid detection. Must be a float between 0 and 1.

0.99

DateTimeQuantileTailsDetector

__init__

__init__(
    quantile: float = 0.005,
    side: Side = BOTH,
    fmt: str | None = None,
) -> None

Detect datetime values in the tails of the data distribution.

Parameters:

Name Type Description Default
quantile float

The quantile defining the tails. Must be between 0 and 1.

0.005
side Side

The side of the distribution to consider. Should be a Side object or a string representing a Side.

BOTH
fmt str | None

The datetime format. If None, it will be automatically inferred.

None

DateTimeRangeValueDetector

__init__

__init__(
    min_val: str | datetime,
    max_val: str | datetime,
    fmt: str | None = None,
) -> None

Detect datetime values within a range.

Parameters:

Name Type Description Default
min_val str | datetime

The minimum value of the range.

required
max_val str | datetime

The maximum value of the range.

required
fmt str | None

The datetime format. If None, it will be automatically inferred.

None

TimeRangeValueDetector

__init__

__init__(
    min_val: str | datetime, max_val: str | datetime
) -> None

Detect time values within a range.

Parameters:

Name Type Description Default
min_val str | datetime

The minimum value of the range.

required
max_val str | datetime

The maximum value of the range.

required

AggregateDetector

__init__

__init__(detectors: Sequence[Detector] = ()) -> None

List of detectors to be simultaneously applied to the data.

Parameters:

Name Type Description Default
detectors Sequence[Detector]

A sequence of Detector objects.

()