gpt4 book ai didi

python - Pandas 读取json ValueError : Protocol not known

转载 作者:行者123 更新时间:2023-12-03 16:29:27 26 4
gpt4 key购买 nike

不久前我运行了这些代码并且它起作用了,但现在有一个 ValueError: protocol not known。任何人都可以帮忙。谢谢。

import json
temp = json.dumps([status._json for status in tweet]) #create JSON
newdf = pd.read_json(temp, orient='records')

最佳答案

据我所知,这个问题是由 Pandas 的更新引起的。
1.1.0 更新对 read_json 函数进行了一些更改。
将 pandas 版本设置为 1.0.5 时,我可以使我的代码正常工作
https://pandas.pydata.org/docs/whatsnew/v1.1.0.html

关于python - Pandas 读取json ValueError : Protocol not known,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63553845/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com