Getting Error reading in JSON file

Hello - new with Python. I have downloaded FDA data from here:

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:


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

you haven’t enter your absolute path. Put your real path to replace variable ‘my_path’

I only took that out to paste here so it’s easier for people to read what I have. I can add if you think that’s why the error is happening.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.