Spaces:
Running
Running
James McCool
commited on
Commit
·
792293e
1
Parent(s):
8ae810a
Refactor app.py: Optimize data filtering for site selection. Updated the display logic to directly filter the hold_display DataFrame based on the selected site, improving performance and readability.
Browse files
app.py
CHANGED
@@ -68,8 +68,7 @@ with tab1:
|
|
68 |
site_var = st.selectbox("Select a Site", ["DraftKings", "FanDuel"])
|
69 |
|
70 |
with hold_container:
|
71 |
-
|
72 |
-
display = hold_display.set_index('Player')
|
73 |
st.dataframe(display.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(player_roo_format, precision=2), height=750, use_container_width = True)
|
74 |
|
75 |
st.download_button(
|
|
|
68 |
site_var = st.selectbox("Select a Site", ["DraftKings", "FanDuel"])
|
69 |
|
70 |
with hold_container:
|
71 |
+
display = hold_display[hold_display['Site'] == site_var]
|
|
|
72 |
st.dataframe(display.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(player_roo_format, precision=2), height=750, use_container_width = True)
|
73 |
|
74 |
st.download_button(
|