Error - unable to read the csv file in pandas



after importing panda
i am unable to read the csv file

import pandas as pd

the error i am getting is :-

FileNotFoundError Traceback (most recent call last)
in ()
----> 1 df=pd.read_csv(“data.csv”)

~\Miniconda3\lib\site-packages\pandas\io\ in parser_f(filepath_or_buffer, sep, delimiter, header, names, index_col, usecols, squeeze, prefix, mangle_dupe_cols, dtype, engine, converters, true_values, false_values, skipinitialspace, skiprows, nrows, na_values, keep_default_na, na_filter, verbose, skip_blank_lines, parse_dates, infer_datetime_format, keep_date_col, date_parser, dayfirst, iterator, chunksize, compression, thousands, decimal, lineterminator, quotechar, quoting, escapechar, comment, encoding, dialect, tupleize_cols, error_bad_lines, warn_bad_lines, skipfooter, doublequote, delim_whitespace, low_memory, memory_map, float_precision)
676 skip_blank_lines=skip_blank_lines)
–> 678 return _read(filepath_or_buffer, kwds)
680 = name

~\Miniconda3\lib\site-packages\pandas\io\ in _read(filepath_or_buffer, kwds)
439 # Create the parser.
–> 440 parser = TextFileReader(filepath_or_buffer, **kwds)
442 if chunksize or iterator:

~\Miniconda3\lib\site-packages\pandas\io\ in init(self, f, engine, **kwds)
785 self.options[‘has_index_names’] = kwds[‘has_index_names’]
–> 787 self._make_engine(self.engine)
789 def close(self):

~\Miniconda3\lib\site-packages\pandas\io\ in _make_engine(self, engine)
1012 def _make_engine(self, engine=‘c’):
1013 if engine == ‘c’:
-> 1014 self._engine = CParserWrapper(self.f, **self.options)
1015 else:
1016 if engine == ‘python’:

~\Miniconda3\lib\site-packages\pandas\io\ in init(self, src, **kwds)
1706 kwds[‘usecols’] = self.usecols
-> 1708 self._reader = parsers.TextReader(src, **kwds)
1710 passed_names = self.names is None

pandas_libs\parsers.pyx in pandas._libs.parsers.TextReader.cinit()

pandas_libs\parsers.pyx in pandas._libs.parsers.TextReader._setup_parser_source()

FileNotFoundError: File b’data.csv’ does not exist


Hi Rishab,

Seems that pandas is not able to find the file, check if the file ‘data.csv’ is in same directory as the python script file. Or change the path to exact location of csv file …



You’ve to give the complete path of the file. For instance, if I save my file on desktop, I’d write it as :

Similarly, find out the complete path of the file and change the command accordingly.


it helped thanks a lot :smiley: