James McCool commited on
Commit
57a5f25
·
1 Parent(s): 55b8b36

Refactor sidebar and container layout in app.py to improve user interface. Moved trimming options to the sidebar and adjusted the export section to use a container with a border. Updated DataFrame display settings for better visibility and reduced height.

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -966,8 +966,7 @@ with tab2:
966
  'Similarity Score': st.session_state['working_frame']['Similarity Score'].max()
967
  }
968
 
969
- col1, col2 = st.columns([2, 8])
970
- with col1:
971
  if 'trimming_dict_maxes' not in st.session_state:
972
  st.session_state['trimming_dict_maxes'] = {
973
  'Own': 500.0,
@@ -1127,7 +1126,7 @@ with tab2:
1127
  st.session_state['working_frame'] = parsed_frame.reset_index(drop=True)
1128
  st.session_state['export_merge'] = st.session_state['working_frame'].copy()
1129
 
1130
- with col2:
1131
  if 'export_base' not in st.session_state:
1132
  st.session_state['export_base'] = pd.DataFrame(columns=st.session_state['working_frame'].columns)
1133
 
@@ -1206,8 +1205,9 @@ with tab2:
1206
  .background_gradient(cmap='RdYlGn')
1207
  .background_gradient(cmap='RdYlGn_r', subset=['Finish_percentile', 'Own', 'Dupes'])
1208
  .format(freq_format, precision=2),
1209
- height=1000,
1210
- use_container_width=True
 
1211
  )
1212
  player_stats_col, stack_stats_col = st.tabs(['Player Stats', 'Stack Stats'])
1213
  with player_stats_col:
 
966
  'Similarity Score': st.session_state['working_frame']['Similarity Score'].max()
967
  }
968
 
969
+ with st.sidebar:
 
970
  if 'trimming_dict_maxes' not in st.session_state:
971
  st.session_state['trimming_dict_maxes'] = {
972
  'Own': 500.0,
 
1126
  st.session_state['working_frame'] = parsed_frame.reset_index(drop=True)
1127
  st.session_state['export_merge'] = st.session_state['working_frame'].copy()
1128
 
1129
+ with st.container(border=True):
1130
  if 'export_base' not in st.session_state:
1131
  st.session_state['export_base'] = pd.DataFrame(columns=st.session_state['working_frame'].columns)
1132
 
 
1205
  .background_gradient(cmap='RdYlGn')
1206
  .background_gradient(cmap='RdYlGn_r', subset=['Finish_percentile', 'Own', 'Dupes'])
1207
  .format(freq_format, precision=2),
1208
+ height=500,
1209
+ use_container_width=True,
1210
+ hide_index=True
1211
  )
1212
  player_stats_col, stack_stats_col = st.tabs(['Player Stats', 'Stack Stats'])
1213
  with player_stats_col: