time_stream.qc.ComparisonCheck¶
- class time_stream.qc.ComparisonCheck(compare_to, operator, flag_na=False)[source]¶
Compares values against a given value using a comparison operator.
- Parameters:
compare_to (float | list)
operator (str)
flag_na (bool)
- __init__(compare_to, operator, flag_na=False)[source]¶
Initialise comparison check.
- Parameters:
compare_to (
float|list) – The value for comparison.operator (
str) – Comparison operator. One of: ‘>’, ‘>=’, ‘<’, ‘<=’, ‘==’, ‘!=’, ‘is_in’.flag_na (
bool) – If True, also flag NaN/null values as failing the check. Defaults to False.
- Return type:
None
Methods
__init__(compare_to, operator[, flag_na])Initialise comparison 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 threshold 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