随着我不断获得NameError: name 'pd' is not defined
,我无法将熊猫导入Jupyter笔记本。在仔细检查其他来源的同时,我相信这使我认为熊猫可能是问题所在。
我需要更新或更改什么?我也将Python升级到了最新版本。
这是我要测试的终端代码:
>>> import pandas as pd
>>> pd.test()
Traceback (most recent call last):
File "//anaconda2/lib/python3.7/site-packages/pandas/util/_tester.py", line 16, in test
import hypothesis # noqa
ModuleNotFoundError: No module named 'hypothesis'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "//anaconda2/lib/python3.7/site-packages/pandas/util/_tester.py", line 18, in test
raise ImportError("Need hypothesis>=3.58 to run tests")
ImportError: Need hypothesis>=3.58 to run tests```
使用“ pip安装假设”使pd.test()起作用,您缺少假设包。我也是