error while file not found

Discussion in 'General Discussions' started by Ananda Shivaji Paymode, Jun 8, 2019.

  1. Ananda Shivaji Paymode

    Joined:
    May 15, 2019
    Messages:
    1
    Likes Received:
    0
    code:
    import pandas as pd
    df_faa_dataset = pd.read_csv('C:\Users\Anand\Desktop\Simply Learn\faa_ai.csv')
    df_faa_dataset.shape

    error:
    IOError Traceback (most recent call last) <ipython-input-21-21c285e72dbe> in <module>() 1importpandasaspd----> 2df_faa_dataset=pd.read_csv('C:\Users\Anand\Desktop\Simply Learn\faa_ai.csv') 3df_faa_dataset.shape/ext/sage/sage-8.7_1804/local/lib/python2.7/site-packages/pandas/io/parsers.pyc 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, skipfooter, 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, doublequote, escapechar, comment, encoding, dialect, tupleize_cols, error_bad_lines, warn_bad_lines, delim_whitespace, low_memory, memory_map, float_precision) 700 skip_blank_lines=skip_blank_lines) 701--> 702return_read(filepath_or_buffer,kwds) 703 704parser_f.__name__=name/ext/sage/sage-8.7_1804/local/lib/python2.7/site-packages/pandas/io/parsers.pyc in _read(filepath_or_buffer, kwds) 427 428# Create the parser.--> 429parser=TextFileReader(filepath_or_buffer,**kwds) 430 431ifchunksizeoriterator:/ext/sage/sage-8.7_1804/local/lib/python2.7/site-packages/pandas/io/parsers.pyc in __init__(self, f, engine, **kwds) 893self.options['has_index_names']=kwds['has_index_names'] 894--> 895self._make_engine(self.engine) 896 897defclose(self):/ext/sage/sage-8.7_1804/local/lib/python2.7/site-packages/pandas/io/parsers.pyc in _make_engine(self, engine) 1120def_make_engine(self,engine='c'): 1121ifengine=='c':-> 1122self._engine=CParserWrapper(self.f,**self.options) 1123else: 1124ifengine=='python':/ext/sage/sage-8.7_1804/local/lib/python2.7/site-packages/pandas/io/parsers.pyc in __init__(self, src, **kwds) 1851kwds['usecols']=self.usecols 1852-> 1853self._reader=parsers.TextReader(src,**kwds) 1854self.unnamed_cols=self._reader.unnamed_cols 1855pandas/_libs/parsers.pyx in pandas._libs.parsers.TextReader.__cinit__()pandas/_libs/parsers.pyx in pandas._libs.parsers.TextReader._setup_parser_source()IOError: [Errno 2] File C:\Users\Anand\Desktop\Simply Learnaa_ai.csv does not exist: 'C:\\Users\\Anand\\Desktop\\Simply Learn\x0caa_ai.csv'

    plz support for same
     
    #1

Share This Page