openclean.function.value.text module
Helper functions for strings.
- class openclean.function.value.text.AlphaNumeric
Bases:
openclean.function.value.base.PreparedFunction
Predicate to test whether a given string contains only alpha-numeric characters.
- eval(value: Union[int, float, str, datetime.datetime, Tuple[Union[int, float, str, datetime.datetime]]]) bool
Returns True if the string representation of a given value contains only alpha-numeric characters.
- Parameters
value (scalar or tuple) – Value from the list that was used to prepare the function.
- Return type
bool
- openclean.function.value.text.to_len(value: Any) int
Get the length of a value. The value is converted to string and the number of characters in the resulting string is returned.
- Parameters
value (any) – Value whose length is returned.
- Return type
int
- openclean.function.value.text.to_lower(value: Any) str
Convert value to lower case stirng. Handles cases where value is not a string.
- Parameters
value (any) – Value that is converted to lower case string.
- Return type
string
- openclean.function.value.text.to_title(value: Any) str
Convert value to title case stirng. Handles cases where value is not a string.
- Parameters
value (any) – Value that is converted to title case string.
- Return type
string
- openclean.function.value.text.to_upper(value: Any) str
Convert value to upper case stirng. Handles cases where value is not a string.
- Parameters
value (any) – Value that is converted to upper case string.
- Return type
string