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