我有以下代码将tweets保存到json文件中
for tweets in tweepy.Cursor(api.user_timeline, id=account).items(1000):
# depending on where the supports club are home or away
if tweets.created_at >= EarliestTweet:
#Write it to a file
json.dump(tweets._json,jsonfile, sort_keys = True, skipkeys = True, indent = 2,ensure_ascii=False)
使用pandasdataframe.read_json
我需要逐行读取json文件还是可以传递read_json文件名来创建数据帧
pandas.read_json
应返回一个数据帧。阅读文档here。在相关问题 更多 >
编程相关推荐