is_between

calista.core.functions.is_between(col_name: str, min_value: Any, max_value: Any) ConditionExpression

Create a condition to check if the column values are between the given lower bound and upper bound.

Args:

col_name (str): The name of the column. min_value (Any): Lower bound max_value (Any): Upper bound

Returns:

ConditionExpression: The condition to check if the column values are between the given lower bound and upper bound.

Example

>>> from calista import CalistaEngine
>>> from calista import functions as func
>>>
>>> calista_table = CalistaEngine(engine = "spark").load_from_dict({"ID": [1, 2, 3, 4]})
>>> my_rule = func.is_between(col_name="ID", min_value=2, max_value=3
>>> print(calista_table.analyze(rule_name="My Rule Name", rule=my_rule))
rule_name : My Rule Name
total_row_count : 4
valid_row_count : 2
valid_row_count_pct : 50.0
timestamp : 2024-01-01 00:00:00.000000