I keep having the following error. you should know that file name is correct and this pandas method works in other py files, please help !!!!
the tablecouleurs is an excel table with no specific characters
import pandas as pd
colors=pd.read_excel('C:\Users\paul\tablecouleurs.xlsx', index_col=0, has_index_names=True)
and error:
runfile('C:/Users/paul/Documents/colors.py', wdir='C:/Users/pauldufosse/Documents') Traceback (most recent call last):
File "", line 1, in runfile('C:/Users/paul/Documents/colors.py', wdir='C:/Users/pauldufosse/Documents')
File "C:\Users\paul\Anaconda\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py", line 685, in runfile execfile(filename, namespace)
File "C:\Users\paul\Anaconda\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py", line 71, in execfile exec(compile(scripttext, filename, 'exec'), glob, loc)
File "C:/Users/paul/Documents/colors.py", line 12, in colors=pd.read_excel('C:\Users\pauldufosse\tablecouleurs.xlsx', index_col=0, has_index_names=True)
File "C:\Users\paul\Anaconda\lib\site-packages\pandas\io\excel.py", line 151, in read_excel return ExcelFile(io, engine=engine).parse(sheetname=sheetname, **kwds)
File "C:\Users\paul\Anaconda\lib\site-packages\pandas\io\excel.py", line 188, in init self.book = xlrd.open_workbook(io)
File "C:\Users\paul\Anaconda\lib\site-packages\xlrd_init_.py", line 394, in open_workbook f = open(filename, "rb")
IOError: [Errno 22] invalid mode ('rb') or filename: 'C:\Users\paul\tablecouleurs.xlsx'