Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,4 +1,3 @@
|
|
1 |
-
|
2 |
import streamlit as st
|
3 |
import pandas as pd
|
4 |
|
@@ -13,7 +12,7 @@ acontainer2 = st.empty()
|
|
13 |
|
14 |
def asubmit(aparam):
|
15 |
adf2 = aparam["adataframe"]
|
16 |
-
astationcode = adf2.loc[
|
17 |
acontainer2.write(astationcode)
|
18 |
adf = pd.DataFrame(
|
19 |
astations,
|
@@ -23,4 +22,5 @@ aoption = acontainer1.selectbox(
|
|
23 |
'Which station?',
|
24 |
adf['atitle']
|
25 |
)
|
26 |
-
acontainer1.button("Submit",on_click=asubmit,args={'aselected':aoption,})
|
|
|
|
|
|
1 |
import streamlit as st
|
2 |
import pandas as pd
|
3 |
|
|
|
12 |
|
13 |
def asubmit(aparam):
|
14 |
adf2 = aparam["adataframe"]
|
15 |
+
astationcode = adf2.loc[adf2["atitle"]==aparam["aselected"]]
|
16 |
acontainer2.write(astationcode)
|
17 |
adf = pd.DataFrame(
|
18 |
astations,
|
|
|
22 |
'Which station?',
|
23 |
adf['atitle']
|
24 |
)
|
25 |
+
acontainer1.button("Submit",on_click=asubmit,args={'aselected':aoption,})
|
26 |
+
#acontainer2.write(aoption)
|