pyufunc.dict_flatten#
- pyufunc.dict_flatten(mapping, *, separator='_', indexes=False)#
Flatten a nested dictionary.
- Parameters:
mapping – Source mapping.
separator – Separator inserted between nested keys.
indexes – If True, include list indexes in flattened keys.
Note
Source package:
python-benedict.Source repository: fabiocaccamo/python-benedict
Source document: fabiocaccamo/python-benedict
Source license: MIT License.
Example
>>> dict_flatten({"a": {"b": 1}}) {'a_b': 1}