python - Create dataframe from nested dictionary keeping nested dictionary as column -


i have following nested dictionary , convert dataframe.

nested dictionary

the first 2 columns keys of first dictionary , third column nested dictionary.

the first 2 columns of dataframe

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

Popular posts from this blog

sequelize.js - Sequelize group by with association includes id -

android - Robolectric "INTERNET permission is required" -

java - Android raising EPERM (Operation not permitted) when attempting to send UDP packet after network connection -