Skip to content Skip to sidebar Skip to footer

Ioerror: [errno 22] Invalid Mode ('rb') Using Pandas.read_excel

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 wi

Solution 1:

Had the same problem. You can solve it by double escaping your path.

The error messages says:

IOError: [Errno 22] invalid mode('rb') or filename: 'C:\Users\pauldufosse\tablecouleurs.xlsx'

Just do:

foo = pd.ExcelFile('C:\\Users\\pauldufosse\\tablecouleurs.xlsx')

This worked for me

Solution 2:

open_workbookf= open(filename, 'rb')

If you check Python library you will see you have to use single quote instead of double quote.

Post a Comment for "Ioerror: [errno 22] Invalid Mode ('rb') Using Pandas.read_excel"