writer = pd.ExcelWriter('Output.xlsx', engine='xlsxwriter')
Sorted_Dataframe_1.to_excel(writer, sheet_name='Sheet1')
Sorted_Dataframe_2.to_excel(writer, sheet_name='Sheet2')
writer.save()
writer.close()
I have 2 DataFrames which I want to save to an existing excel named 'Output' to Sheet1 and Sheet2, respectively (see code). I am working in Sheet3 in excel itself, and every time I run the code, it deletes the Sheet3, and thus overwrites the whole excel. Is there any function to just 'update' sheets 1 and 2 but not touch the other sheets that I do not recall by the function in the 'Output' xlsx?