In Python, I'm working with a dataset to determine how reactions of users are related to the post reach. My dataset is structured in this way, the Reactions column being nested:
PostID Reach Reaction
01 787767 {"like":49852,"wow":8017,"haha":3200,"anger":3}
02 973183 {"like":57911,"wow":3013,"haha":8017,"anger":15}
03 ... ...
I want to restructure the data and create separate reaction columns so the dataframe would be looking like that:
PostID Reach like wow haha anger
01 787767 49852 8017 3200 3
02 973183 57911 3013 8017 15
03 ... ...