path = '/content/drive/MyDrive/gbd.json'
df = pd.read_json(path)
this is the error I am getting.
ValueError Traceback (most recent call last)
<ipython-input-11-3e269770844d> in <module>()
1 path = '/content/drive/MyDrive/gbd.json'
----> 2 df = pd.read_json(path)
6 frames
/usr/local/lib/python3.7/dist-packages/pandas/io/json/_json.py in _parse_no_numpy(self)
1138 if orient == "columns":
1139 self.obj = DataFrame(
-> 1140 loads(json, precise_float=self.precise_float), dtype=None
1141 )
1142 elif orient == "split":
ValueError: Expected object or value
I have tried all the following solutions
data= pd.read_json('Data.json', lines=True)
data= pd.read_json('Data.json', lines=True, orient='records')
data= pd.read_json('Data.json', orient=str)
this is the link to the json file
https://ccewuksprdoneregsadata1.blob.core.windows.net/data/json/publicextract.charity.zip
I want to create a dataframe from the json file
>Solution :
i was able to make a DataFrame with a small extract of your file and the problem was that there is a small unvisible group of char before the beginning of the file, which somehow blocks it. It wouldn’t be visible to all editors and it was s pure luck that I tested it with different editors. This char looks something like , try to open it with different editors and to delete it and it will work.