With pandas it is easy to read Excel files and convert the data into a DataFrame Unfortunately Excel files in the real world are often poorly constructed In those cases where the data is scattered across the worksheet, you may need to customize the way you read the dataThe easiest way to retrieve the sheetnames from an excel (xls, xlsx) is tabs = pdExcelFile("path")sheet_names print(tabs)enter code here Then to read and store the data of a particular sheet (say, sheet names are "Sheet1", "Sheet2", etc), say "Sheet2" for example data = pdread_excel("path", "Sheet2") print(data)Pandas Looking up the list of sheets in an excel file You can still use the ExcelFile class (and the sheet_names attribute) xl = pdExcelFile ('fooxls') xlsheet_names # see all sheet names xlparse (sheet_name) # read a specific sheet to DataFrame see docs for parse for more options
Combine Multiple Excel Worksheets Into A Single Pandas Dataframe Practical Business Python