【发布时间】:2019-04-30 23:02:53
【问题描述】:
我最近尝试使用 pandas 加载 url 数据集 从这里:flag's dataset
我的代码是:
enter code here
Import pandas as pd
dataset= pd.read_csv('https://archive.ics.uci.edu/ml/machine-learning-databases/flags/flag.data')
dataset.head()
一切正常,但我收到一条错误消息。我试图尽可能地理解这个消息..但我失败了。这里的消息:
TimeoutError: [WinError 10060] A connection attempt failed because the
connected party did not properly respond after a period of time, or
established connection failed because connected host has failed to respond
During handling of the above exception, another exception occurred:
URLError Traceback (most recent call last)
<ipython-input-16-13064d485dcd> in <module>()
【问题讨论】:
-
您是否一直收到此错误,或者重新运行代码时是否有效?我能够毫无问题地读取 URL