length_lt

calista.core.functions.length_lt(col_name: str, length: int) ConditionExpression

Create a condition to check if the values of length is lower than a given value.

Args:

col_name (str): The name of the column. length (int): The length to compare against.

Returns:

ConditionExpression: The result of the values of length is lower than a given value.

Example

>>> from calista import CalistaEngine
>>> from calista import functions as func
>>>
>>> calista_table = CalistaEngine(engine = "spark").load_from_dict({"PLANETE": ["mars", None, "jupiter", "terre"]})
>>> my_rule = func.length_lt(col_name="PLANETE", length=4)
>>> print(calista_table.analyze(rule_name="My Rule Name", rule=my_rule))
rule_name : My Rule Name
total_row_count : 4
valid_row_count : 0
valid_row_count_pct : 0.0
timestamp : 2024-01-01 00:00:00.000000