TimeFrame.qc_check

TimeFrame.qc_check(check, column_name, observation_interval=None, flag_params=None, **kwargs)[source]

Apply a quality control check to the TimeFrame.

Parameters:
  • check (Union[str, Type[QCCheck], QCCheck]) – The QC check to apply.

  • column_name (str) – The column to perform the check on.

  • observation_interval (tuple[datetime, datetime | None] | None) – Optional time interval to limit the check to.

  • flag_params (tuple[str, str | int] | None) – Tuple of (flag column name [str], flag value [str | int]. If provided, add given flag value to the flag column where the QC check returns True. If not provided, the result of the QC check is returned as a boolean series.

  • **kwargs – Parameters specific to the check type.

Return type:

TimeFrame | Series

Returns:

Result of the QC check, either as a boolean Series or added to the TimeFrame dataframe