multiple filter
all_data_return_scrap.loc[
~((all_data_return_scrap.RACK_INFO.str.startswith('a', na=False))
| (all_data_return_scrap.RACK_INFO.str.startswith('c', na=False))
| (all_data_return_scrap.RACK_INFO.str.startswith('d', na=False))
].shape
pivot table
add to a exist file with Sheet2
book = openpyxl.load_workbook('2.xlsx')
writer = pd.ExcelWriter('2.xlsx', engine='openpyxl')
writer.book = book
writer.sheets = dict((ws.title, ws) for ws in book.worksheets)
df1.to_excel(writer, 'Sheet2')
writer.save()