0

I am new to python. I have json file with many record and I want to convert that into tabular format. a sample of json data is show here. all records follows similar structure. Below is sample json file. for simplicity I kept only two records.I am looking for a generic solution that I can use for files having different data. json file -->[{ 'asset':{'id':'123'}, 'topvol':[{'a':'x','b':{'c':'cc','d':'dd'},'cxt':[{'m':'n'},{'m':'nn'}]},{'a':'x','b':{'c':'cc','d':'dd'},'cxt':[{'m':'n'},{'m':'nn'}]}] },{ 'asset':{'id':'124'}, 'topvol':[{'a':'x','b':{'c':'cc','d':'dd'},'cxt':[{'m':'n'},{'m':'nn'}]},{'a':'x','b':{'c':'cc','d':'dd'},'cxt':[{'m':'n'},{'m':'nn'}]}] }]

expected output: this is just for one record.asset.id 124 will have similar output. enter image description here

osama
  • 53
  • 1
  • 6
  • Does this answer your question? [JSON to pandas DataFrame](https://stackoverflow.com/questions/21104592/json-to-pandas-dataframe) – Junkrat Nov 22 '19 at 17:07
  • no. I am looking for a generic solution that can be used for other file having different data – osama Nov 22 '19 at 17:14

0 Answers0