我有一个问题与读_csv与网址,下面的代码运行错误,尽管网址是有效的。在
>>> import pandas as pd
>>> df = pd.read_csv("http://www.ats.ucla.edu/stat/data/binary.csv")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/pymodules/python2.7/pandas/io/parsers.py", line 102, in read_csv
f = com._get_handle(filepath_or_buffer, 'r', encoding=encoding)
File "/usr/lib/pymodules/python2.7/pandas/core/common.py", line 633, in _get_handle
f = open(path, mode)
IOError: [Errno 2] No such file or directory: 'http://www.ats.ucla.edu/stat/data/binary.csv'
>>>
read_csv仅在文件存在于我的目录中时运行
^{pr2}$这有点令人困惑,因为documentation表示字符串可能是一个url。在
有人能帮我吗?在
谢谢
目前没有回答
相关问题 更多 >
编程相关推荐