0

According to the pandas documentation we can use an url as a parameter of the function read_csv() in pandas 0.25.1

It works on my terminal but I can't understand why the result is different on jupyter

Terminal it works:

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

Jupyter:

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)>
Steve
  • 23
  • 1
  • 4
  • https://stackoverflow.com/questions/50236117/scraping-ssl-certificate-verify-failed-error-for-http-en-wikipedia-org ? – rafaelc Sep 18 '19 at 20:25
  • from what I saw, there are solutions but no one explains the source of the problem with jupyter. – Steve Sep 18 '19 at 20:29
  • 2
    It is not a problem with Jupyter per se. You have two different python instances running: one with version `3.6.8` - likely shipped together with your macbook since most (if not all) linux-based OS have Python built-in ; the other with version `3.7.3` - likely downloaded with your anaconda package. Anaconda has their own python distribution. Apparently, certificates have been verified for your built-in python , but not for Anaconda's. You maybe either verify them with the URL above steps, or point your jupyter to use your OS python and not Anaconda's. – rafaelc Sep 18 '19 at 20:41

0 Answers0