Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -49,21 +49,20 @@ option = st.selectbox(
|
|
49 |
("usdm", "coinm", "copyTraders", "okx")
|
50 |
)
|
51 |
|
52 |
-
|
53 |
# Get the selected sheet name
|
54 |
-
|
55 |
|
56 |
# Open the Google Sheet and select the worksheet
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
|
61 |
# Fetch data from the worksheet and display it
|
62 |
-
|
63 |
-
|
64 |
|
65 |
|
66 |
-
workbook = client.open_by_key(sheet_id)
|
67 |
|
68 |
sheet3 = workbook.worksheet("Performance")
|
69 |
|
|
|
49 |
("usdm", "coinm", "copyTraders", "okx")
|
50 |
)
|
51 |
|
52 |
+
st.button("Load Sheet"):
|
53 |
# Get the selected sheet name
|
54 |
+
sheet_name = sheet_mapping[option]
|
55 |
|
56 |
# Open the Google Sheet and select the worksheet
|
57 |
+
sheet_id = "1I_PuAeWTaRC4OhS5BA5gv0XQCA17VlIjpA1MvOlzVA8" # Replace with your actual Sheet ID
|
58 |
+
workbook = client.open_by_key(sheet_id)
|
59 |
+
sheet = workbook.worksheet(sheet_name)
|
60 |
|
61 |
# Fetch data from the worksheet and display it
|
62 |
+
data = sheet.get_all_records()
|
63 |
+
df = pd.DataFrame(data)
|
64 |
|
65 |
|
|
|
66 |
|
67 |
sheet3 = workbook.worksheet("Performance")
|
68 |
|