import pandas as pd
if __name__ == '__main__':
result_file = "monitor_data.xlsx"
pre_month_data = pd.read_csv(f"./pre_month_data", delimiter="\t")
pre_week_data = pd.read_csv(f"./pre_week_data", delimiter="\t")
all_data = pd.read_csv(f"./all_data", delimiter="\t")
pre_data = pd.concat([pre_month_data, pre_week_data], axis=0)
all_data.to_excel(result_file, index=False, sheet_name="all_data")
excel_writer = pd.ExcelWriter(result_file, mode='a', engine="openpyxl")
pre_data.to_excel(excel_writer, index=False, sheet_name="pre_data")
excel_writer.save()
excel_writer.close()