Getting Error reading in JSON file


Joined
Apr 28, 2022
Messages
1
Reaction score
0
Hello - new with Python. I have downloaded FDA data from here:
https://open.fda.gov/apis/drug/ndc/download/

I am trying to read in the file and then export to csv. For some reason that I cannot figure out, I get error 'Mixing dicts with non-Series may lead to ambiguous ordering.'

My code is as follows:

Code:
import pandas as pd
df = pd.read_json(r'C:\{my_path}\drug-ndc-0001-of-0001.json')
df.to_csv (r'C:\{my_path}\NDCData.xlsx', index = None)

Any assistance is appreciated. Thanks
 
Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top