My code:
def write_excel(filename, sheetname, dataframe): with pd.ExcelWriter(filename, engine=\'openpyxl\', mode=\'a\') as writer: workBook = writer.