openclean.function.value.cond module
The mapping operator that returns a dictionary that contains a mapping of original values in a data frame column(s) to results of applying a given value function on them.
Lookup functions represent mappings using dictionaries.
- class openclean.function.value.cond.ConditionalStatement(predicate, stmt, elsestmt=None)
Bases:
openclean.function.value.base.PreparedFunction
Conditional if-then-else statement. Depending on a given predicate either one of two statements is evaluated.
- eval(value)
Replace function returns the predefined replacement value if the given value satisfies the predicate. Otherwise, the argument value is returned.
- Parameters
value (scalar or tuple) – Value from the list that was used to prepare the function.
- Return type
any