-
-
Save thomasaarholt/19f8ab4c64237417cd341a02f5aec3f4 to your computer and use it in GitHub Desktop.
This file contains 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
def nested_dict_to_df(nested_dict): | |
left = [] | |
right = [] | |
value = [] | |
for outer_key, inner_dict in nested_dict.items(): | |
for inner_key, val_list in inner_dict.items(): | |
left.append(outer_key) | |
right.append(inner_key) | |
value.append(list(val_list)) | |
return left, right, value |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment