a10 commited on
Commit
6bc184e
·
1 Parent(s): eec28c8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -3
app.py CHANGED
@@ -10,11 +10,15 @@ astations = [
10
  acontainer1 = st.empty()
11
  acontainer2 = st.empty()
12
 
 
 
13
  adf = pd.DataFrame(
14
  astations,
15
  columns=['akey','astationcode','alatitude','alongitude','atitle',]
16
  )
17
  aoption = acontainer1.selectbox(
18
- 'Which station?',
19
- adf['atitle'])
20
- acontainer2.write(aoption)
 
 
 
10
  acontainer1 = st.empty()
11
  acontainer2 = st.empty()
12
 
13
+ def aoptionchange(aparam):
14
+ acontainer2.write(aparam)
15
  adf = pd.DataFrame(
16
  astations,
17
  columns=['akey','astationcode','alatitude','alongitude','atitle',]
18
  )
19
  aoption = acontainer1.selectbox(
20
+ 'Which station?',
21
+ adf['atitle'],
22
+ on_change=aoptionchange
23
+ )
24
+ #acontainer2.write(aoption)