personalcapital.util.find_enums module¶
-
personalcapital.util.find_enums.
make_enum_mapping
(values, max_perc_unique=0.5)[source]¶ Takes a list of string values and creates a dict mapping of str -> int, emulating the behavior of an Enum. :param <iterable> values:
values to create a mapping forParameters: max_perc_unique – maximum % of unique values to justify creating a mapping Return dict: the create mapping (if justified), otherwise None