Condition¶
- class baybe.constraints.conditions.Condition[source]¶
Bases:
ABC,SerialMixinAbstract base class for all conditions.
Conditions always evaluate an expression regarding a single parameter. Conditions are part of constraints, a constraint can have multiple conditions.
Public methods
__init__()evaluate(data)Evaluate the condition on a given data series.
from_dict(dictionary)Create an object from its dictionary representation.
from_json(string)Create an object from its JSON representation.
to_dict()Create an object's dictionary representation.
to_json()Create an object's JSON representation.
to_polars(expr, /)Apply the condition to a Polars expression.
- to_json()¶
Create an object’s JSON representation.
- Return type:
- Returns:
The JSON representation as a string.