Linked Questions

Popular Questions

I have a code like below

import json
import ast
import pandas as pd

data = [[110636, [{'Name': 'cd0', 'id': '1'}, {'Name': 'cd1', 'id': '2'}, {'Name': 'cd2', 'id': '3'}]]]
df = pd.DataFrame(data, columns=['id','json_load'])
df['json_load'] = df['json_load'].astype(str).apply(json.loads)
exploded = df.explode("json_load")
df = pd.json_normalize(exploded['json_load'])

While executing the code, I am getting error like json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 1 column 3 (char 2) even though it's a valid JSON

Can anyone please help?

Related Questions