首页 > 解决方案 > 为什么熊猫 read_csv() 在 jupyter 上返回 SSL: CERTIFICATE_VERIFY_FAILED?

问题描述

根据pandas 文档,我们可以在 pandas 0.25.1 中使用 url 作为函数 read_csv() 的参数

它适用于我的终端,但我不明白为什么 jupyter 上的结果不同

终端它的工作原理:

Python 3.6.8 
>>> import pandas as pd
>>> pd.__version__
'0.25.1'
>>> pd.read_csv("https://raw.githubusercontent.com/file.csv")

木星:

In [9]: import pandas as pd
In [11]: pd.__version__
Out[11]: '0.25.1'
In[12]: from platform import python_version
print(python_version())
3.7.3
In [12]: pd.read_csv("https://raw.githubusercontent.com/file.csv")
...
URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)>

标签: python-3.xpandas

解决方案


推荐阅读