I am trying to unpack nested JSON in the following pandas dataframe:
id info
0 0 [{u'a': u'good', u'b': u'type1'}, {u'a': u'bad', u'b': u'type2'}]
1 1 [{u'a': u'bad', u'b': u'type1'}, {u'a': u'bad', u'b': u'type2'}]
2 2 [{u'a': u'good', u'b': u'type1'}, {u'a': u'good', u'b': u'type2'}]
My expected outcome is:
id type1 type2
0 0 good bad
1 1 bad bad
2 2 good good
I've been looking at other solutions including json_normalize but it does not work for me unfortunately. Should I treat the JSON as a string to get what I want? Or is there a more straight forward way to do this?


