JERNGOC commited on
Commit
7eb6b34
·
verified ·
1 Parent(s): 8cc682d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -101,7 +101,7 @@ if uploaded_file is not None:
101
  output = BytesIO()
102
  writer = pd.ExcelWriter(output, engine='xlsxwriter')
103
  df.to_excel(writer, index=False, sheet_name='Feature Importance')
104
- writer.save()
105
  processed_data = output.getvalue()
106
  return processed_data
107
 
 
101
  output = BytesIO()
102
  writer = pd.ExcelWriter(output, engine='xlsxwriter')
103
  df.to_excel(writer, index=False, sheet_name='Feature Importance')
104
+ writer.close() # 使用 close() 來正確保存 Excel 文件
105
  processed_data = output.getvalue()
106
  return processed_data
107