python - Create dataframe from nested dictionary keeping nested dictionary as column -
i have following nested dictionary , convert dataframe.
the first 2 columns keys of first dictionary , third column nested dictionary.
any suggestions? lot in advance!
that's not greatest input data, if you're confident structure of dictionary won't change, try below:
dataframe([ [x[0] x in nested_dict.keys()], [x[1] x in nested_dict.keys()], [x x in nested_dict.values()], ]).t
this should give dataframe specs.
0 1 2 0 timestamp4 324 {326: 3} 1 timestamp3 323 {325: 2} 2 timestamp 321 {321: 0} 3 timestamp2 322 {323: 1}
Comments
Post a Comment