utils
¶
Module Contents¶
-
utils.
list_to_dict
(lst, key_name, remove_key=True)[source]¶ Convert a list of dictionaries into a dictionary of dictionaries.
- Parameters
key_name – The name of the key from the child dictionary to use to use in the parent.
remove_key – Remove the key used for the parent dictionary from the child.
- Returns
The resulting dictionary.
- Return type
result (dict)