James McCool commited on
Commit
84a7686
·
1 Parent(s): f054296

Update preset label in app.py for clarity and consistency

Browse files

- Changed the option label from 'Distributed (Spread Risk)' to 'Distributed (Spread Out Risk)' in the preset selection dropdown.
- This update enhances user interface clarity for preset choices.

Files changed (2) hide show
  1. app.py +1 -1
  2. global_func/distribute_preset.py +0 -1
app.py CHANGED
@@ -1116,7 +1116,7 @@ with tab2:
1116
  parsed_frame = small_field_preset(st.session_state['working_frame'], lineup_target, excluded_cols)
1117
  elif preset_choice == 'Large Field (Finish Percentile / Edge)':
1118
  parsed_frame = large_field_preset(st.session_state['working_frame'], lineup_target, excluded_cols)
1119
- elif preset_choice == 'Distributed (Spread Risk)':
1120
  parsed_frame = distribute_preset(st.session_state['working_frame'], lineup_target, excluded_cols)
1121
  st.session_state['working_frame'] = parsed_frame.reset_index(drop=True)
1122
  st.session_state['export_merge'] = st.session_state['working_frame'].copy()
 
1116
  parsed_frame = small_field_preset(st.session_state['working_frame'], lineup_target, excluded_cols)
1117
  elif preset_choice == 'Large Field (Finish Percentile / Edge)':
1118
  parsed_frame = large_field_preset(st.session_state['working_frame'], lineup_target, excluded_cols)
1119
+ elif preset_choice == 'Distributed (Spread Out Risk)':
1120
  parsed_frame = distribute_preset(st.session_state['working_frame'], lineup_target, excluded_cols)
1121
  st.session_state['working_frame'] = parsed_frame.reset_index(drop=True)
1122
  st.session_state['export_merge'] = st.session_state['working_frame'].copy()
global_func/distribute_preset.py CHANGED
@@ -18,7 +18,6 @@ def distribute_preset(portfolio: pd.DataFrame, lineup_target: int, exclude_cols:
18
  working_portfolio = working_portfolio[working_portfolio['Finish_percentile'] >= (finish_threshold - 1)]
19
  working_portfolio = working_portfolio.sort_values(by='median', ascending = False)
20
  working_portfolio = working_portfolio.reset_index(drop=True)
21
- print(working_portfolio.head(10))
22
  curr_own_type_max = working_portfolio.loc[0, 'Weighted Own'] + (slack_var / 20 * working_portfolio.loc[0, 'Weighted Own'])
23
 
24
  for i in range(1, len(working_portfolio)):
 
18
  working_portfolio = working_portfolio[working_portfolio['Finish_percentile'] >= (finish_threshold - 1)]
19
  working_portfolio = working_portfolio.sort_values(by='median', ascending = False)
20
  working_portfolio = working_portfolio.reset_index(drop=True)
 
21
  curr_own_type_max = working_portfolio.loc[0, 'Weighted Own'] + (slack_var / 20 * working_portfolio.loc[0, 'Weighted Own'])
22
 
23
  for i in range(1, len(working_portfolio)):