Spaces:
Running
Running
James McCool
commited on
Commit
·
779f835
1
Parent(s):
a25e372
Update app.py to store filtered player data in session state, ensuring proper data management and enhancing the display logic for the 'Simple' view.
Browse files
app.py
CHANGED
@@ -206,7 +206,7 @@ with tab2:
|
|
206 |
player_roo_raw['Site'] = 'Draftkings'
|
207 |
elif site_var2 == 'Fanduel':
|
208 |
player_roo_raw['Site'] = 'Fanduel'
|
209 |
-
|
210 |
if view_var == "Simple":
|
211 |
st.session_state['player_roo'] = st.session_state['player_roo'][['Player', 'Position', 'Salary', 'Median', 'Ceiling', 'Own']]
|
212 |
st.dataframe(st.session_state['player_roo'].style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(player_roo_format, precision=2), height=750, use_container_width = True, hide_index=True)
|
|
|
206 |
player_roo_raw['Site'] = 'Draftkings'
|
207 |
elif site_var2 == 'Fanduel':
|
208 |
player_roo_raw['Site'] = 'Fanduel'
|
209 |
+
st.session_state['player_roo'] = player_roo_raw.drop(columns=['site', 'slate', 'version', 'timestamp'])
|
210 |
if view_var == "Simple":
|
211 |
st.session_state['player_roo'] = st.session_state['player_roo'][['Player', 'Position', 'Salary', 'Median', 'Ceiling', 'Own']]
|
212 |
st.dataframe(st.session_state['player_roo'].style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(player_roo_format, precision=2), height=750, use_container_width = True, hide_index=True)
|