rainfallqc.core.all_qc_checks¶
Register for QC checks in RainfallQC.
- rainfallqc.core.all_qc_checks.get_columns_in_kwargs(kwargs, kwarg_name, column_list, name)[source]¶
Check that a column exists in the DataFrame.
- Parameters:
kwargs (
dict) – Dictionary of keyword arguments.kwarg_name (
str) – Name of the kwarg to check.column_list (
list) – List to append the column_name to if it exists.name (
str) – Name of the QC check (for error messages).
- Raises:
ValueError – If the column does not exist in the DataFrame.
- Return type:
list
- rainfallqc.core.all_qc_checks.qc_check(name, require_non_negative=False)[source]¶
Register a QC check and check for non-negative values if required.
- Parameters:
name (
str) – Name of the QC check.require_non_negative (
bool) – If True, check that the target gauge column has no negative values before running the QC check
- Return type:
callable- Returns:
- :
- callable
Decorator to register the QC check.
- Raises:
ValueError – If require_non_negative is True and the target gauge column contains negative values.
Functions¶
|
Check that a column exists in the DataFrame. |
|
Register a QC check and check for non-negative values if required. |