Deeplearning/Qfunctions/saveToxlsx.py
2024-10-07 09:54:32 +08:00

14 lines
518 B
Python

import os
def save_to_xlsx(project_name, file_name, data):
os.makedirs(f'Result/{project_name}', exist_ok=True)
data.to_excel(f'Result/{project_name}/{file_name}.xlsx', index=True)
print("Save successed to " + f'Result/{project_name}/{file_name}.xlsx')
# for filename,data in save_maps.items():
# data.to_excel(f'Result/{project_name}/{filename}.xlsx', index=True)
# print("Save successed to " + f'Result/{project_name}/{filename}.xlsx')
# print('Save to xlsx done!')
return