Multichem commited on
Commit
de04fae
·
1 Parent(s): 9a3fd1a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -2
app.py CHANGED
@@ -148,7 +148,7 @@ with tab1:
148
  with tab2:
149
  with st.container():
150
  hold_container = st.empty()
151
- col1, col2, col3, col4, col5 = st.columns([2, 2, 2, 2, 2])
152
  with col1:
153
  if st.button("Load/Reset Data", key='reset1'):
154
  for key in st.session_state.keys():
@@ -273,7 +273,13 @@ with tab2:
273
  st.session_state.final_Proj = final_Proj
274
 
275
  hold_container = st.empty()
276
-
 
 
 
 
 
 
277
  with st.container():
278
  if 'final_Proj' in st.session_state:
279
  st.dataframe(st.session_state.final_Proj.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(precision=2), use_container_width = True)
 
148
  with tab2:
149
  with st.container():
150
  hold_container = st.empty()
151
+ col1, col2, col3, col4, col5, col6 = st.columns([2, 2, 2, 2, 2, 2])
152
  with col1:
153
  if st.button("Load/Reset Data", key='reset1'):
154
  for key in st.session_state.keys():
 
273
  st.session_state.final_Proj = final_Proj
274
 
275
  hold_container = st.empty()
276
+ with col6:
277
+ if 'final_Proj' in st.session_state:
278
+ player_swap = st.selectbox('Select player to swap to:', options = st.session_state.final_Proj['Player'].unique(), key='dk_player')
279
+ if st.button('Make swaps'):
280
+ with hold_container:
281
+ st.session_state.display_portfolio.replace(player_check, player_swap, inplace=True)
282
+
283
  with st.container():
284
  if 'final_Proj' in st.session_state:
285
  st.dataframe(st.session_state.final_Proj.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(precision=2), use_container_width = True)