我正在努力与熊猫相处。我正在使用 Thonny 作为 IDLE 学习 Python。我在我的 cmd 中使用 pip 命令安装了熊猫。不知何故,我无法在我的 IDLE 中导入 pandas 方法,因此我通过设置将其添加为包。问题是:当我尝试运行以下代码时,我只在 jupyter notebook 和我的 cmd 中收到错误,但在 thonny IDLE 中没有。
import pandas as pd
df = pd.read_csv("pokemon_data.csv")
print(df)
Out(Cmd):
Traceback (most recent call last):
File "pokemonData.py", line 1, in <module>
import pandas as pd
File "C:\Users\pc\AppData\Roaming\Python\Python37\site-packages\pandas\__init_
_.py", line 13, in <module>
__import__(dependency)
File "C:\Users\pc\AppData\Roaming\Python\Python37\site-packages\numpy\__init__
.py", line 142, in <module>
from . import core
File "C:\Users\pc\AppData\Roaming\Python\Python37\site-packages\numpy\core\__i
nit__.py", line 23, in <module>
WinDLL(os.path.abspath(filename))
File "C:\Users\pc\AppData\Local\Programs\Python\Python37\lib\ctypes\__init__.p
y", line 356, in __init__ …Run Code Online (Sandbox Code Playgroud)