sidpy.base.dict_utils.nested_dict_from_flattened_key

sidpy.base.dict_utils.nested_dict_from_flattened_key(single_pair, separator='-')[source]

Converts a dictionary with a single key: value pair to a nested dictionary

Parameters:
  • single_pair (dict) – Dictionary with a single key-value pair

  • separator (str, optional. Default = '-') – Separator used to delimit the levels in the keys

Returns:

nested_dict – Nested dictionary

Return type:

dict

Notes

Converts {‘A|B|C’: value}… to
{‘A’:
‘B’: {‘C’: value_1,

}

}

}