我有多个json文件:
data_part1.json
data_part2.json
data_part3.json
...
它们是这样写的:
{"transaction_id":203019326,"amount":2.4,"user_invoice_date":"2018-11-19"}
{"transaction_id":261491169,"amount":2.4,"user_invoice_date":"2019-02-20"}
{"transaction_id":294748592,"amount":2.4,"user_invoice_date":"2019-03-30"}
我已经尝试读取第一个文件:
openfile=open('path')
jsondata=json.load(openfile)
df=pd.DataFrame(jsondata)
openfile.close()
但是出现以下错误:
JSONDecodeError: Expecting ',' delimiter: line 2 column 1 (char 77)
如何将这些文件读入数据框?