I have a text file which contains json
in each row.
Sample Data: in file.text
{"id": "testid1","title": "testtitle1","link": "testlink1","description": "testdes2","entities": ["en1", "en2"]}
{"id": "testid2","title": "testtitle2","link": "testlink2","description": "testdes2","entities": [""]}
{"id": "testid1","title": "testtitle1","link": "testlink1","description": "testdesc","entities": ["en1", "en2", "en3"]}
Output required:
id title link description entities__001 entities__002 entities__003
testid1 testtitle1 testlink1 testdes2 en1 en2
testid2 testtitle2 testlink2 testdes2
testid1 testtitle1 testlink1 testdesc en1 en2 en3
Please suggest, how can I do the same in python?
I have tried to convert my file to csv
online using https://json-csv.com/. However, It only supports up to 1 MB file in free account and my file size is around 200 MB. However, using this link I was able to covert it successfully with desired output.