I have a dataframe like (with one example row):
raw_data = [{'id': 1, 'name': 'FRANK', 'attributes': '{"deleted": false, "rejected": true, "handled": true, "order": "37"}'}]
raw_df = pd.DataFrame(raw_data)
I would like to break the json in the attributes column into their own columns with each of their values so that the resulting dataframe looks like:
new_data = [{'id': 1, 'name': 'FRANK', 'deleted': 'false', 'rejected': 'true', 'handled': 'true', 'order': 37}]
new_df = pd.DataFrame(new_data)
Is there a way I can break up the json to achieve this? Thanks!
raw_df? Mayberead_jsoncan help. Alsojson_normalize.pd.read_csv