time_stream.qc.FlatLineCheck¶
- class time_stream.qc.FlatLineCheck(min_count, tolerance=None, ignore_value=None)[source]¶
Detect flat lines by checking for consecutive repeated values.
- Parameters:
min_count (int)
tolerance (float | None)
ignore_value (int | float | str | list | None)
- __init__(min_count, tolerance=None, ignore_value=None)[source]¶
Initialise flat line detection check.
- Parameters:
min_count (
int) – Minimum number of consecutive repeated values required for a flat line. Must be at least 2.tolerance (
float|None) – Optional tolerance for near-equality comparison. When set, consecutive values differing by less than or equal to this amount are considered equal. Only valid for numeric columns. Defaults to None (exact equality).ignore_value (
int|float|str|list|None) – Optional value or list of values that are allowed to repeat without being flagged. For float columns, int values are automatically upcast to float. For all other column types, values must match the column’s type exactly.
- Return type:
None
Methods
__init__(min_count[, tolerance, ignore_value])Initialise flat line detection 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 flat line detection.
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