New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't read csv using python pandas #16531
Comments
File path is proper, their are read and write permissions provided on file.. |
Can you try writing that as either |
or you can use @TomAugspurger maybe worthwile to put this in the doc-string / docs as this is a fairly common error? |
import pandas as pd I have given the code as above and getting the below errors. Can someone help with this please? Am struck for quite a lot of time on this Errors: |
Code Sample, a copy-pastable example if possible
Problem description
I am unable to read csv through python pandas.
Kindly check code snippet, it's giving following error:
Traceback (most recent call last):
File "", line 1, in
File "C:\ProgramData\Anaconda3\lib\site-packages\pandas\io\parsers.py", line 655, in parser_f
return _read(filepath_or_buffer, kwds)
File "C:\ProgramData\Anaconda3\lib\site-packages\pandas\io\parsers.py", line 405, in _read
parser = TextFileReader(filepath_or_buffer, **kwds)
File "C:\ProgramData\Anaconda3\lib\site-packages\pandas\io\parsers.py", line 762, in init
self._make_engine(self.engine)
File "C:\ProgramData\Anaconda3\lib\site-packages\pandas\io\parsers.py", line 966, in _make_engine
self._engine = CParserWrapper(self.f, **self.options)
File "C:\ProgramData\Anaconda3\lib\site-packages\pandas\io\parsers.py", line 1582, in init
self._reader = parsers.TextReader(src, **kwds)
File "pandas_libs\parsers.pyx", line 394, in pandas._libs.parsers.TextReader.cinit (pandas_libs\parsers.c:4209)
File "pandas_libs\parsers.pyx", line 710, in pandas._libs.parsers.TextReader._setup_parser_source (pandas_libs\parse
rs.c:8873)
FileNotFoundError: File b'C:\Script\testexp.csv' does not exist
[this should explain why the current behaviour is a problem and why the expected output is a better solution.]
Expected Output
Output of
pd.show_versions()
The text was updated successfully, but these errors were encountered: