changxin commited on
Commit
337c28c
1 Parent(s): a06ba85

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -49,7 +49,8 @@ def fx_datatable(code:str):
49
  namespace = {}
50
  fun = compile(code,'<string>','exec')
51
  exec(fun,namespace)
52
- return namespace['py_exe'],namespace['py_exe'].to_excel('data.xlsx',index=False)
 
53
  '''
54
  def fx_dd(tk:str,s:str):
55
  headers= {"Content-Type": "application/json"}
 
49
  namespace = {}
50
  fun = compile(code,'<string>','exec')
51
  exec(fun,namespace)
52
+ with pd.ExcelWriter('data.xlsx') as pd_table:
53
+ return namespace['py_exe'],namespace['py_exe'].to_excel(pd_table,index=False)
54
  '''
55
  def fx_dd(tk:str,s:str):
56
  headers= {"Content-Type": "application/json"}