Skip to content
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

Continued error message: No such file or directory: './cities.xlsx' #1

Open
Atrailhiker opened this issue Dec 16, 2018 · 0 comments
Open

Comments

@Atrailhiker
Copy link

Unable to import excel files into jupyter notebook

CODE
import pandas travel_df = pandas.read_excel('./cities.xlsx') cities = travel_df.to_dict('records') cities[0]

ERROR
`---------------------------------------------------------------------------
FileNotFoundError Traceback (most recent call last)
in ()
1 import pandas
----> 2 travel_df = pandas.read_excel('./cities.xlsx')
3 cities = travel_df.to_dict('records')
4 cities[0]

~\Anaconda3\lib\site-packages\pandas\util_decorators.py in wrapper(*args, **kwargs)
176 else:
177 kwargs[new_arg_name] = new_arg_value
--> 178 return func(*args, **kwargs)
179 return wrapper
180 return _deprecate_kwarg

~\Anaconda3\lib\site-packages\pandas\util_decorators.py in wrapper(*args, **kwargs)
176 else:
177 kwargs[new_arg_name] = new_arg_value
--> 178 return func(*args, **kwargs)
179 return wrapper
180 return _deprecate_kwarg

~\Anaconda3\lib\site-packages\pandas\io\excel.py in read_excel(io, sheet_name, header, names, index_col, usecols, squeeze, dtype, engine, converters, true_values, false_values, skiprows, nrows, na_values, parse_dates, date_parser, thousands, comment, skipfooter, convert_float, **kwds)
305
306 if not isinstance(io, ExcelFile):
--> 307 io = ExcelFile(io, engine=engine)
308
309 return io.parse(

~\Anaconda3\lib\site-packages\pandas\io\excel.py in init(self, io, **kwds)
392 self.book = xlrd.open_workbook(file_contents=data)
393 elif isinstance(self._io, compat.string_types):
--> 394 self.book = xlrd.open_workbook(self._io)
395 else:
396 raise ValueError('Must explicitly set engine if not passing in'

~\Anaconda3\lib\site-packages\xlrd_init_.py in open_workbook(filename, logfile, verbosity, use_mmap, file_contents, encoding_override, formatting_info, on_demand, ragged_rows)
114 peek = file_contents[:peeksz]
115 else:
--> 116 with open(filename, "rb") as f:
117 peek = f.read(peeksz)
118 if peek == b"PK\x03\x04": # a ZIP file

FileNotFoundError: [Errno 2] No such file or directory: './cities.xlsx'
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant