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.
Asked
Active
Viewed 1,755 times
0
-
1Does this answer your question? [Using Pandas to pd.read\_excel() for multiple worksheets of the same workbook](https://stackoverflow.com/questions/26521266/using-pandas-to-pd-read-excel-for-multiple-worksheets-of-the-same-workbook) – The Singularity Sep 20 '21 at 07:38
1 Answers
0
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)

Guyblublu
- 26
- 3