openclean.util.core module
Collection of helper functions for various purpoeses.
- openclean.util.core.always_false(*args)
Predicate that always evaluates to False.
- Parameters
args (any) – Variable list of arguments.
- Return type
bool
- class openclean.util.core.eval_all(predicates, truth_value=True)
Bases:
object
Logic operator that evaluates a list of predicates and returns True only if all predicates return a defined result value.
- openclean.util.core.is_list_or_tuple(value)
Test if a given value is a list or tuple that can be converted into multiple arguments.
- Parameters
value (any) – Any object that is tested for being a list or tuple.
- Return type
bool
- openclean.util.core.scalar_pass_through(value)
Pass-through method for single scalar values.
- Parameters
value (scalar) – Scalar cell value from a data frame row.
- Return type
scalar
- openclean.util.core.tenary_pass_through(*args)
Pass-through method for a list of argument values.
- Parameters
args (list of scalar) – List of argument values.
- Return type
scalar
- openclean.util.core.unique_identifier(length: Optional[int] = None) str
Get an identifier string of given length. Uses UUID to generate a unique string and return the requested number of characters from that string.
- Parameters
length (int, default=None) – Number of characters in the returned string.
- Return type
string