[英]Accessing CSV data from raw github file using python pandas
Why does the following code give the error?:为什么下面的代码会报错?:
urllib.error.URLError: <urlopen error [Errno 11001] getaddrinfo failed>
Using the following code:使用以下代码:
import pandas as pd
url= 'https://raw.githubusercontent.com/justmarkham/pandas-videos/master/data/drinks.csv'
df=pd.read_csv(url)
Make sure you are not connected through a proxy or VPN.确保您没有通过代理或 VPN 连接。
I had this same issue while working from home while connected to my company's VPN.我在连接到我公司的 VPN 时在家工作时遇到了同样的问题。 As soon as I disconnected from VPN the error went away.
一旦我与 VPN 断开连接,错误就消失了。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.