I am trying to read in the JSON structure below into pandas dataframe, but it throws out the error message:
ValueError: Mixing dicts with non-Series may
You can use json_normalize with assign:
from pandas.io.json import json_normalize
import json
with open('json_file.json') as data_file:
d= json.load(data_file)
df = json_normalize(d, 'result').assign(**d['status'])
print (df)
club_id id statuscode statusmessage
0 16182 22 200 Everything OK
1 16182 23 200 Everything OK
2 16182 24 200 Everything OK
3 16182 25 200 Everything OK
4 16182 26 200 Everything OK
5 16182 27 200 Everything OK