jackiekazil / data-wrangling

Code repository for Data Wrangling with Python (O'Reilly)
559 stars 564 forks source link

CH4 Page 76 - Parse Excel Setup #17

Open bruceblevy opened 5 years ago

bruceblevy commented 5 years ago

I've created a folder on the desktop, inserted the SOWC 2014 Stat Tables_Table 9.xlsx along with parse_excel.py.

It says to now run 'python parse_script.py' from the command line, which gives the following: C:\>python parse_script.py python: can't open file 'parse_script.py': [Errno 2] No such file or directory

Also, I cannot store the opened file in the book variable: book = xlrd.open_workbook('SOWC 2014 Stat Tables_Table 9.xlsx')

>>> book = xlrd.open_workbook('SOWC 2014 Stat Tables_Table 9.xlsx') Traceback (most recent call last): File "<pyshell#0>", line 1, in <module> book = xlrd.open_workbook('SOWC 2014 Stat Tables_Table 9.xlsx') File "C:\Python\Python36\lib\site-packages\xlrd\__init__.py", line 111, in open_workbook with open(filename, "rb") as f: FileNotFoundError: [Errno 2] No such file or directory: 'SOWC 2014 Stat Tables_Table 9.xlsx'