pandera.backends.narwhals.builtin_checks.in_range¶
- pandera.backends.narwhals.builtin_checks.in_range(col_expr, min_value, max_value, include_min=True, include_max=True)[source]¶
Ensure all values of a series are within an interval.
Both endpoints must be a type comparable to the dtype of the series to be validated.
- Parameters:
col_expr (
Expr) – Narwhals column expression to check.min_value (~T) – Left / lower endpoint of the interval.
max_value (~T) – Right / upper endpoint of the interval. Must not be smaller than min_value.
include_min (
bool) – Defines whether min_value is also an allowed value (the default) or whether all values must be strictly greater than min_value.include_max (
bool) – Defines whether max_value is also an allowed value (the default) or whether all values must be strictly smaller than max_value.
- Return type:
Expr