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¶
-
intThe 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:strArgument being validated
-
column:strName of the column
-
query:flowmachine.core.query.QueryThe query to check the column against the columns of
-
allow_none:bool, defaultTrueSet to False to error when the column is None.
Returns¶
-
strThe column name