Spaces:
Sleeping
Sleeping
Commit ·
908064b
1
Parent(s): 3dbc374
feat : add label
Browse files
app.py
CHANGED
|
@@ -64,12 +64,16 @@ async def cryptohistory():
|
|
| 64 |
df["date"] = df["date"].astype(str)
|
| 65 |
|
| 66 |
# 建立回傳資料
|
|
|
|
| 67 |
results = []
|
| 68 |
for idx, row in df.iterrows():
|
| 69 |
results.append({
|
| 70 |
"id": idx + 1,
|
| 71 |
"date": row["date"],
|
| 72 |
-
"
|
|
|
|
|
|
|
|
|
|
| 73 |
"volume": float(row["volume"])
|
| 74 |
})
|
| 75 |
|
|
|
|
| 64 |
df["date"] = df["date"].astype(str)
|
| 65 |
|
| 66 |
# 建立回傳資料
|
| 67 |
+
# date,open,high,low,close,volume
|
| 68 |
results = []
|
| 69 |
for idx, row in df.iterrows():
|
| 70 |
results.append({
|
| 71 |
"id": idx + 1,
|
| 72 |
"date": row["date"],
|
| 73 |
+
"open": float(row["open"]),
|
| 74 |
+
"high": float(row["high"]),
|
| 75 |
+
"low": float(row["low"]),
|
| 76 |
+
"close": float(row["close"]),
|
| 77 |
"volume": float(row["volume"])
|
| 78 |
})
|
| 79 |
|