|
@@ -8,6 +8,7 @@ import base64
|
|
|
import pandas as pd
|
|
|
from model.DateUtils import DateUtils
|
|
|
from pandas.io.excel import ExcelWriter
|
|
|
+from pandas import read_csv
|
|
|
|
|
|
log = logger()
|
|
|
|
|
@@ -54,10 +55,13 @@ class BaseHandler(RequestHandler, DateUtils):
|
|
|
self.set_header("Pargam", "no-cache")
|
|
|
self.set_header("Cache-Control", "no-cache")
|
|
|
df = pd.DataFrame(data).to_csv(encoding='utf-8')
|
|
|
- print(df)
|
|
|
+ # print(df)
|
|
|
# with open(f'./{pitcher}_{start}_{end}.csv','w',newline='') as f:
|
|
|
# f.write(df)
|
|
|
- self.write(df)
|
|
|
+ f = open(df)
|
|
|
+ data = read_csv(f)
|
|
|
+ data.to_excel('xxx.xlsx')
|
|
|
+ self.write(data)
|
|
|
|
|
|
|
|
|
def get_args(self):
|