不是输入 .csv文件,但是出现 File b'data/data.csv' does not exist错误

C:\Users\Dell\Anaconda3\python.exe C:/Temp/lassos/first.py
Traceback (most recent call last):
File "C:/Temp/lassos/first.py", line 10, in
ori_data = pd.read_csv(path, header=0, sep='\t')
File "C:\Users\Dell\AppData\Roaming\Python\Python37\site-packages\pandas\io\parsers.py", line 678, in parser_f
return read(filepath_or_buffer, kwds)
File "C:\Users\Dell\AppData\Roaming\Python\Python37\site-packages\pandas\io\parsers.py", line 440, in _read
parser = TextFileReader(filepath_or_buffer, **kwds)
File "C:\Users\Dell\AppData\Roaming\Python\Python37\site-packages\pandas\io\parsers.py", line 787, in __init
_
self._make_engine(self.engine)
File "C:\Users\Dell\AppData\Roaming\Python\Python37\site-packages\pandas\io\parsers.py", line 1014, in make_engine
self._engine = CParserWrapper(self.f, **self.options)
File "C:\Users\Dell\AppData\Roaming\Python\Python37\site-packages\pandas\io\parsers.py", line 1708, in __init
_
self._reader = parsers.TextReader(src, **kwds)
File "pandas_libs\parsers.pyx", line 384, in pandas._libs.parsers.TextReader.__cinit__
File "pandas_libs\parsers.pyx", line 695, in pandas._libs.parsers.TextReader._setup_parser_source
FileNotFoundError: File b'data/data.csv' does not exist

1个回答

意思是你的CSV文件不存在,data/data.csv路径错了吧

weixin_39086917
weixin_39086917 怎么操作呢?新手入门,求指教,谢谢
一年多之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问