相关疑难解决方法(0)

如何修复 AttributeError:部分初始化的模块?

我正在尝试运行我的脚本,但不断收到此错误:

File ".\checkmypass.py", line 1, in <module>
  import requests 
line 3, in <module>
  response = requests.get(url) 
AttributeError: partially initialized module 'requests' has no attribute 'get' (most likely due to a circular import)
Run Code Online (Sandbox Code Playgroud)

我该如何解决?

python python-3.x

23
推荐指数
2
解决办法
6万
查看次数

AttributeError:模块'pandas'没有属性'read_csv'Python3.5

我已经成功使用了pandas.read_csv很长时间但突然它在我尝试读取csv文件时开始出错

df = pd.read_csv('file.csv', encoding='utf-8')
Run Code Online (Sandbox Code Playgroud)

错误是

AttributeError: module 'pandas' has no attribute 'read_csv'
Run Code Online (Sandbox Code Playgroud)

我试图升级熊猫但不起作用.我试图搜索并得到这个答案,但当我在我的熊猫中搜索csv.py文件时,我没有找到任何答案.所以我试图将鼠标悬停在pandas.read_csv需要我提交的方法上parsers.py.但是在该文件中没有命名的特定方法,read_csv但它指向另一个像这样的解析器函数

# parser.py (built-in file in pandas) file has this implementation
read_csv = _make_parser_function('read_csv', sep=',')
read_csv = Appender(_read_csv_doc)(read_csv)
Run Code Online (Sandbox Code Playgroud)

我不明白它应该如何重新开始工作?有什么建议

python python-3.x pandas

8
推荐指数
2
解决办法
2万
查看次数

标签 统计

python ×2

python-3.x ×2

pandas ×1