Pandas: Looking up the list of sheets in an excel file

The Solution to Pandas: Looking up the list of sheets in an excel file is


You can still use the ExcelFile class (and the sheet_names attribute):

xl = pd.ExcelFile('foo.xls')

xl.sheet_names  # see all sheet names

xl.parse(sheet_name)  # read a specific sheet to DataFrame

see docs for parse for more options...

~ Answered on 2013-07-31 18:01:21


Most Viewed Questions: