Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1123,6 +1123,7 @@ def fetch_and_store_data():
|
|
| 1123 |
else:
|
| 1124 |
print(f"Failed to fetch data with status code: {response.status_code}")
|
| 1125 |
return None
|
|
|
|
| 1126 |
|
| 1127 |
def fetch_and_store_data_market():
|
| 1128 |
latest_doc = market_price_data.find_one(sort=[("Reported Date", -1)])
|
|
@@ -1348,7 +1349,7 @@ if st.session_state.authenticated:
|
|
| 1348 |
# Submit button to trigger the query and plot
|
| 1349 |
if st.sidebar.button("✨ Let's go!"):
|
| 1350 |
try:
|
| 1351 |
-
|
| 1352 |
if "Market Name" in query_filter:
|
| 1353 |
market_cursor = market_price_data.find(query_filter)
|
| 1354 |
market_data = list(market_cursor)
|
|
@@ -1517,9 +1518,7 @@ if st.session_state.authenticated:
|
|
| 1517 |
|
| 1518 |
elif view_mode=="Statistics":
|
| 1519 |
document = collection.find_one()
|
| 1520 |
-
print(document)
|
| 1521 |
df = get_dataframe_from_collection(collection)
|
| 1522 |
-
print(df)
|
| 1523 |
display_statistics(df)
|
| 1524 |
elif view_mode == "Exim":
|
| 1525 |
df = collection_to_dataframe(impExp)
|
|
|
|
| 1123 |
else:
|
| 1124 |
print(f"Failed to fetch data with status code: {response.status_code}")
|
| 1125 |
return None
|
| 1126 |
+
|
| 1127 |
|
| 1128 |
def fetch_and_store_data_market():
|
| 1129 |
latest_doc = market_price_data.find_one(sort=[("Reported Date", -1)])
|
|
|
|
| 1349 |
# Submit button to trigger the query and plot
|
| 1350 |
if st.sidebar.button("✨ Let's go!"):
|
| 1351 |
try:
|
| 1352 |
+
df_market_grouped = []
|
| 1353 |
if "Market Name" in query_filter:
|
| 1354 |
market_cursor = market_price_data.find(query_filter)
|
| 1355 |
market_data = list(market_cursor)
|
|
|
|
| 1518 |
|
| 1519 |
elif view_mode=="Statistics":
|
| 1520 |
document = collection.find_one()
|
|
|
|
| 1521 |
df = get_dataframe_from_collection(collection)
|
|
|
|
| 1522 |
display_statistics(df)
|
| 1523 |
elif view_mode == "Exim":
|
| 1524 |
df = collection_to_dataframe(impExp)
|