Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1218,7 +1218,7 @@ def fetch_and_store_data_market():
|
|
| 1218 |
df.rename(columns={"Price Date": "Reported Date"}, inplace=True)
|
| 1219 |
records = df.to_dict(orient="records")
|
| 1220 |
if records:
|
| 1221 |
-
|
| 1222 |
print(f"Inserted {len(records)} new records into MongoDB.")
|
| 1223 |
else:
|
| 1224 |
print("No new records to insert.")
|
|
@@ -1333,7 +1333,7 @@ if st.session_state.authenticated:
|
|
| 1333 |
st.sidebar.header("Filters")
|
| 1334 |
selected_period = st.sidebar.selectbox(
|
| 1335 |
"Select Time Period",
|
| 1336 |
-
["2 Weeks", "1 Month", "3 Months", "1 Year", "5 Years"],
|
| 1337 |
index=1
|
| 1338 |
)
|
| 1339 |
period_mapping = {
|
|
|
|
| 1218 |
df.rename(columns={"Price Date": "Reported Date"}, inplace=True)
|
| 1219 |
records = df.to_dict(orient="records")
|
| 1220 |
if records:
|
| 1221 |
+
market_price_data.insert_many(records)
|
| 1222 |
print(f"Inserted {len(records)} new records into MongoDB.")
|
| 1223 |
else:
|
| 1224 |
print("No new records to insert.")
|
|
|
|
| 1333 |
st.sidebar.header("Filters")
|
| 1334 |
selected_period = st.sidebar.selectbox(
|
| 1335 |
"Select Time Period",
|
| 1336 |
+
["2 Weeks", "1 Month", "2 Months", "3 Months", "6 Months", "1 Year", "2 Years", "5 Years"],
|
| 1337 |
index=1
|
| 1338 |
)
|
| 1339 |
period_mapping = {
|