Ask a question to get started
Enter to sendā¢Shift+Enter new line
Flatten a nested dictionary into a flat dictionary.
flatten_dict( nested_dict: Dict[str, Any], parent_key: str = '', sep: str = '_' ) -> Dict[str, Any]
nested_dict
dict
The nested dictionary to flatten.
parent_key
str
''
The prefix to prepend to the keys of the flattened dict.
sep
'_'
The separator to use between the parent key and the key of the flattened dictionary.