I am trying to read multiple tabs in spreadsheet to different dataframes and once all tabs with data are over the program should stop.
For first part I am looking to
This will read all sheets and make a dictionary of dataframes:
xl = pd.read_excel('Unique.xlsx', sheet_name=None)
To get specific sheets, you could do:
xl_dict = {}
sheetname_list = ['blah1', 'blah2', 'blah3']
for sheet in sheetname_list:
xl_dict[sheet] = pd.read_excel('Unique.xlsx', sheet_name=sheet)
or:
xl = pd.read_excel('Unique.xlsx', sheet_name=sheetname_list)