James McCool commited on
Commit
24e9e65
·
1 Parent(s): 3d00450

Enhance app.py UI with site selection and dynamic data display. Added a select box for choosing between DraftKings and FanDuel, and updated the data display to filter based on the selected site. Improved layout with empty containers for better organization.

Browse files
Files changed (1) hide show
  1. app.py +10 -3
app.py CHANGED
@@ -63,10 +63,17 @@ with tab1:
63
  rand_player = 0
64
  boost_player = 0
65
  salaryCut = 0
66
-
67
  hold_container = st.empty()
68
- display = hold_display.set_index('Player')
69
- st.dataframe(display.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(player_roo_format, precision=2), height=750, use_container_width = True)
 
 
 
 
 
 
 
70
  st.download_button(
71
  label="Export Projections",
72
  data=convert_df_to_csv(display),
 
63
  rand_player = 0
64
  boost_player = 0
65
  salaryCut = 0
66
+ options_container = st.empty()
67
  hold_container = st.empty()
68
+
69
+ with options_container:
70
+ site_var = st.selectbox("Site", ["DraftKings", "FanDuel"])
71
+
72
+ with hold_container:
73
+ hold_display = hold_display.loc[hold_display['Site'] == site_var]
74
+ display = hold_display.set_index('Player')
75
+ st.dataframe(display.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(player_roo_format, precision=2), height=750, use_container_width = True)
76
+
77
  st.download_button(
78
  label="Export Projections",
79
  data=convert_df_to_csv(display),