【发布时间】:2017-04-18 17:56:06
【问题描述】:
我正在尝试读取推文的 json 文件,但我不断收到此错误
ValueError: Expecting , delimiter: line 1 column 537 (char 536)
Code:
import json
import pandas as pd
import matplotlib.pyplot as plt
import json
with open('/Users/Mustafa/desktop/tweets.json', 'r') as f:
line = f.readline() # read only the first tweet/line
tweet = json.loads(line) # load it as Python dict
print(json.dumps(tweet, indent=4)) # pretty-print
知道如何解决这个问题或我做错了什么吗?
【问题讨论】: