Jun-06-2021, 07:55 AM
I am looping over different worksheet in excel. I wanted to removed any tabs that are start with name "Sheet" and followed by anything. I want to loop over different excel sheet so that I can removed an item from list where excel sheet name starts with "Sheet" while looping. Can anyone help me how to this task in pthon.
for fn in xlsm_files: all_dfs=pd.read_excel(fn, sheet_name=None,header=None, engine='openpyxl') list_data = all_dfs.keys() all_dfs.pop('Date',None) all_dfs.pop(r'Sheet[0-9]',None)