split pandas nested dictionary or data frame into separate dictionaries/data frames each named/assigned the original sheet name

Viewed 20

I read an Excel book with 20 sheets using pandas which created a nested dictionary like the one below. I would like to split the nest dictionary into 20 separate dictionaries; each dictionary have or assigned to the sheet name in the original dictionary I converted the nested dictionary into pandas data frame, but I ran into the same problem where I could not split the nest data frame into 20 separate data frames each named/assigned the original sheet name.

Any hep is greatly appreciated.

EK

An example is below.

sheet1   sheet2  sheet3.....     Sheet names
a b c   a b c   a b c       Variable names
1 2 2-  2 4 4   4 3 4 
4 4 4   5 5 5   1 2 2
 
Desired outcome

sheet1 a single dictionary or data frame named sheet1
a b c
1 2 2
4 4 4
sheet2 a single dictionary or data frame named sheet2
a b c 
2 4 4
5 5 5
sheet3 a single dictionary or data frame named sheet3
a b c 
4 3 4
1 2 2
0 Answers
Related