How can I load data from JSON file with raw long text data?
I have big file with news:
[body]
is a news data that I need to analyze.
I tried to read it like this:
with open('file.json', 'r') as openfile:
# Reading from json file
dfnew = json.load(openfile)
openfile.close
But I get an error:
Extra data: line 2 column 1 (char 1938)
Maybe you know the better way, how can I save it, to easily read?
I created the file from dataframe by using this code:
df.to_json('file.json', orient='records', lines=True)
question from:
https://stackoverflow.com/questions/65881546/how-to-save-and-load-data-from-json 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…