flowmachine.features.utilities.validators¶
valid_median_window¶
valid_median_window(arg_name: str, value: int)
Raise a value error if the value provided is not an odd positive integer bigger than 1. Parameters ---------- arg_name : str Argument name for error message value : int Value to check
Returns¶
-
int
The validated value
validate_column_present¶
validate_column_present(arg_name: str, column: str, query: flowmachine.core.query.Query, allow_none=True)
Raises a value error if the column is not in the columns of the query.
Parameters¶
-
arg_name
:str
Argument being validated
-
column
:str
Name of the column
-
query
:flowmachine.core.query.Query
The query to check the column against the columns of
-
allow_none
:bool
, defaultTrue
Set to False to error when the column is None.
Returns¶
-
str
The column name