An excel file has multiple sheets, i want to read those sheets into multiple pandas dataframe. Is there a way to do it? Please Let Me know.
CodePudding user response:
xls = pd.ExcelFile('path_to_file.xls')
sheets_names = ['Sheet1', 'Sheet2']
dfs = []
for sheet_name in sheets_names:
df[i] = pd.read_excel(xls, sheet_name)