James McCool
commited on
Commit
·
27f1d0e
1
Parent(s):
13c9e13
adjusting enter comparison formatting
Browse files
app.py
CHANGED
|
@@ -780,7 +780,11 @@ if selected_tab == 'Contest Analysis':
|
|
| 780 |
if pos_select:
|
| 781 |
position_mask = player_exp_comp['Pos'].apply(lambda x: any(pos in x for pos in pos_select))
|
| 782 |
player_exp_comp = player_exp_comp[position_mask]
|
| 783 |
-
st.dataframe(player_exp_comp.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 784 |
st.download_button(label="Download Player Info", data=player_exp_comp.to_csv(index=False), file_name="player_info.csv", mime="text/csv", key='player_exp_comp_download')
|
| 785 |
else:
|
| 786 |
if st.session_state['entry_parse_var'] == 'All':
|
|
|
|
| 780 |
if pos_select:
|
| 781 |
position_mask = player_exp_comp['Pos'].apply(lambda x: any(pos in x for pos in pos_select))
|
| 782 |
player_exp_comp = player_exp_comp[position_mask]
|
| 783 |
+
st.dataframe(player_exp_comp.
|
| 784 |
+
style.background_gradient(cmap='RdYlGn', axis=0).
|
| 785 |
+
format(formatter='{:.2f}', subset=player_exp_comp.iloc[:, 2:4].select_dtypes(include=['number']).columns).
|
| 786 |
+
format(formatter='{:.2%}', subset=player_exp_comp.iloc[:, 4:].select_dtypes(include=['number']).columns),
|
| 787 |
+
hide_index=True)
|
| 788 |
st.download_button(label="Download Player Info", data=player_exp_comp.to_csv(index=False), file_name="player_info.csv", mime="text/csv", key='player_exp_comp_download')
|
| 789 |
else:
|
| 790 |
if st.session_state['entry_parse_var'] == 'All':
|