time_stream.qc.RangeCheck

class time_stream.qc.RangeCheck(min_value, max_value, closed='both', within=True)[source]

Check that values fall within an acceptable range.

Parameters:
  • min_value (float | time | date | datetime)

  • max_value (float | time | date | datetime)

  • closed (str | ClosedInterval)

  • within (bool)

__init__(min_value, max_value, closed='both', within=True)[source]

Initialise range check.

Parameters:
  • min_value (float | time | date | datetime) – Minimum of the range.

  • max_value (float | time | date | datetime) – Maximum of the range.

  • closed (str | ClosedInterval) – Define which sides of the interval are closed (inclusive) {‘both’, ‘left’, ‘right’, ‘none’} (default = “both”)

  • within (bool) – Whether values get flagged when within or outside the range (default = True (within)).

Return type:

None

Methods

__init__(min_value, max_value[, closed, within])

Initialise range check.

apply(df, time_name, check_column[, ...])

Apply the QC check to the data.

available()

Return a sorted list of available registered keys.

expr(ctx, column)

Return the Polars expression for range checking.

get(spec, **kwargs)

Resolve spec to an instance of Self:

register(register_cls)

A method used as a decorator for subclasses to add to the register by its name attribute.

Attributes

name