1>>> df1 = pd.DataFrame([["AAA", "BBB"]], columns=["Spam", "Egg"])
2>>> df2 = pd.DataFrame([["ABC", "XYZ"]], columns=["Foo", "Bar"])
3>>> with ExcelWriter("path_to_file.xlsx") as writer:
4... df1.to_excel(writer, sheet_name="Sheet1")
5... df2.to_excel(writer, sheet_name="Sheet2")
6