python - 导入错误:无法在 Anaconda 提示符下导入 numpy 和 pandas
问题描述
我已经安装了 numpy 1.16.4 和 pandas 0.24.2。但是我仍然收到以下错误消息;
Traceback (most recent call last):
File "C:\Users\FLUXNATURE\Desktop\khady_01\pandas.py", line 8, in'module'
import pandas as pd
File "C:\Users\FLUXNATURE\Desktop\khady_01\pandas.py", line 9, in 'module'
df = pd.read_excel(r'C:\Users\FLUXNATURE\Desktop\use.xlsx')
AttributeError: module 'pandas' has no attribute 'read_excel'
运行以下代码时:
import pandas as pd
df = pd.read_excel(r'C:\Users\FLUXNATURE\Desktop\use.xlsx')
print(df)
我正在使用 Windows 在 Anaconda 提示符下运行此文件。请帮助解决这个问题。
解决方案
推荐阅读
- asp.net - 需要帮助在 asp.net 核心中与 CRUD 建立多对多关系
- vim - 防止 vim 将文件添加到 oldfiles 列表
- tensorflow - 带有错误`ValueError:形状(None,5)和(None,500)不兼容`的Tensorflow模型
- mule - 如何每天只使用 mulesoft 发送一次电子邮件?
- python - 在python中将JSON信息存储到字典中的问题
- typescript - 将 Typescript 泛型与 any 相结合而不会丢失类型
- android - 在一个recyclerViews中实现多个视图
- python - 根据 levenshtein 距离将数据框列中的字符串与列表中的单词进行比较
- python - 函数中索引的参数
- typescript - How to mock a deeply nested function with TypeScript and Jest