Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,5 +1,4 @@
|
|
1 |
|
2 |
-
|
3 |
import streamlit as st
|
4 |
import pandas as pd
|
5 |
|
@@ -14,7 +13,9 @@ acontainer2 = st.empty()
|
|
14 |
acontainer3 = st.empty()
|
15 |
|
16 |
def asubmit(aparam):
|
17 |
-
|
|
|
|
|
18 |
|
19 |
adf = pd.DataFrame(
|
20 |
astations,
|
@@ -25,4 +26,4 @@ aoption = acontainer1.selectbox(
|
|
25 |
adf['atitle']
|
26 |
)
|
27 |
if acontainer2.button("Submit") == True:
|
28 |
-
asubmit(aparam={"aselected":aoption,"acontainer":acontainer3,"adataframe":adf,})
|
|
|
1 |
|
|
|
2 |
import streamlit as st
|
3 |
import pandas as pd
|
4 |
|
|
|
13 |
acontainer3 = st.empty()
|
14 |
|
15 |
def asubmit(aparam):
|
16 |
+
adf2 = aparam["adataframe"]
|
17 |
+
aselecteditem = adf2[adf2.loc[adf2["atitle"]==aparam["aselected"]]]["astationcode"]
|
18 |
+
aparam["acontainer"].write((" {} ").format(aselecteditem))
|
19 |
|
20 |
adf = pd.DataFrame(
|
21 |
astations,
|
|
|
26 |
adf['atitle']
|
27 |
)
|
28 |
if acontainer2.button("Submit") == True:
|
29 |
+
asubmit(aparam={"aselected":aoption,"acontainer":acontainer3,"adataframe":adf,})
|