Here is the data frame. Which contain some cells having a dictionary in them. I want to convert the dictionary items to columns
dfx={'name':['Alex','Jin',np.nan,'Peter'],
'age':[np.nan,10,12,13],
'other':[{'school':'abc','subject':'xyz'},
np.nan,
{'school':'abc','subject':'xyz'},
np.nan,]
}
dfx=pd.DataFrame(dfx)
Output
name age other
Alex {'school': 'abc', 'subject': 'xyz'}
Jin 10.0
12.0 {'school': 'abc', 'subject': 'xyz'}
Peter 13.0
Here is the Desired output
name age school subject
Alex abc xyz
Jin 10.0
12.0 abc xyz
Peter 13.0