Created
April 8, 2020 14:43
-
-
Save RaulMedeiros/3774c224626b90e2b81dff8729e151f1 to your computer and use it in GitHub Desktop.
fletten_dict
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pandas.io.json.normalize import nested_to_record # _normalize for new versions | |
def fletten_dict(dict_): | |
return {tuple(k.split('.')):v for k, v in nested_to_record(dict_).items()} | |
procss_data_dict_flatten = fletten_dict(procss_data_dict) | |
procss_data_dict_flatten.keys() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment