dataframely.testing.rules module

dataframely.testing.rules.evaluate_rules(lf: LazyFrame, rules: dict[str, Rule]) LazyFrame[source]

Evaluate the provided rules and return the rules’ evaluation.

Args:

lf: The data frame on which to evaluate the rules. rules: The rules to evaluate where the key of the dictionary provides the name

of the rule.

Returns:

The same return value as with_evaluation_rules() only that the columns of the input data frame are dropped.

dataframely.testing.rules.rules_from_exprs(exprs: dict[str, Expr]) dict[str, Rule][source]

Turn a set of expressions into simple rules.

Args:

exprs: The expressions, mapping from names to polars.Expr.

Returns:

The rules corresponding to the expressions.