I have the following df
whose values are dictionaries:
tests
SO4 {'Mon': 6, 'Tues': 6, 'Wed': 7}
CH3 {'Mon': 0, 'Tues': 8, 'Wed': 10}
I would like to obtain the desired output :
0 1 2
SO4 'Mon': 6 'Tues': 6 'Wed': 7
CH3 'Mon': 0 'Tues': 8 'Wed': 10
How could I split the dictionary into individual columns?
I have seen the columns split of strings using rsplit
function but not sure on how to apply it in the case of dictionaries as values.