whylogs.api.logger.experimental.logger.actor.string_util#

Module Contents#

Functions#

encode_strings(→ int)

Encode a list of strings as a number by hashing each one and then adding them together.

whylogs.api.logger.experimental.logger.actor.string_util.encode_strings(col_names: List[str]) int#

Encode a list of strings as a number by hashing each one and then adding them together. This is useful for generating group keys based on string lists that don’t care about order and have reasonably low collision rate without having to sort everything.

Parameters

col_names (List[str]) – list of column names to encode.

Return type

int