James McCool commited on
Commit
7a8cb18
·
1 Parent(s): 7157836

Enhance working_frame processing in app.py: add prediction and trimming logic to session state, ensuring maximum values are tracked for key metrics, improving data handling and analysis capabilities.

Browse files
Files changed (1) hide show
  1. app.py +9 -0
app.py CHANGED
@@ -883,6 +883,15 @@ with tab2:
883
  sum(map_dict['own_map'].get(player, 0) for player in row.iloc[1:]),
884
  axis=1
885
  )
 
 
 
 
 
 
 
 
 
886
 
887
  col1, col2 = st.columns([2, 8])
888
  with col1:
 
883
  sum(map_dict['own_map'].get(player, 0) for player in row.iloc[1:]),
884
  axis=1
885
  )
886
+ st.session_state['working_frame'] = predict_dupes(st.session_state['working_frame'], map_dict, site_var, type_var, Contest_Size, strength_var, sport_var)
887
+ if 'trimming_dict_maxes' not in st.session_state:
888
+ st.session_state['trimming_dict_maxes'] = {
889
+ 'Own': st.session_state['working_frame']['Own'].max(),
890
+ 'Geomean': st.session_state['working_frame']['Geomean'].max(),
891
+ 'Weighted Own': st.session_state['working_frame']['Weighted Own'].max(),
892
+ 'median': st.session_state['working_frame']['median'].max(),
893
+ 'Finish_percentile': st.session_state['working_frame']['Finish_percentile'].max()
894
+ }
895
 
896
  col1, col2 = st.columns([2, 8])
897
  with col1: