I have nested dictionary as below. I want to create Dataframe as shown in expected output.
Code-
dct = { "a" :
{ "b" :
[{ "2022-03-31" : { "c":"20"} },
{ "2021-03-31" : { "c" : "30" } } ] },
"e" : { "b" :
[{ "2022-03-31" : { "d":"300"} },
{ "2021-03-31" : { "d" : "29" } } ] } ,
"h" :
{ "b" :
[ {"2022-03-31" : { "f":"190"} },
{ "2021-03-31" : { "f" : "98" } } ] } }
hi = pd.DataFrame.from_dict(dct, orient='index')
hi
I tried above code but it's not giving desired output.
Expected Output-
date c d f
2022-03-31 20 30 300
2021-03-31 30 29 98