Multichem commited on
Commit
55c314c
·
verified ·
1 Parent(s): 67c91fa

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -98,7 +98,10 @@ with tab1:
98
  if line_var1 == 'Percentage':
99
  team_frame = team_frame[['Team', 'Opp', 'Win%', 'Vegas', 'Win% Diff', 'PD Spread', 'Vegas Spread', 'Spread Diff']]
100
  team_frame = team_frame.set_index('Team')
101
- st.dataframe(team_frame.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(precision=2), use_container_width = True)
 
 
 
102
  if line_var1 == 'American':
103
  team_frame = team_frame[['Team', 'Opp', 'Win Line', 'Vegas Line', 'Line Diff', 'PD Spread', 'Vegas Spread', 'Spread Diff']]
104
  team_frame = team_frame.set_index('Team')
 
98
  if line_var1 == 'Percentage':
99
  team_frame = team_frame[['Team', 'Opp', 'Win%', 'Vegas', 'Win% Diff', 'PD Spread', 'Vegas Spread', 'Spread Diff']]
100
  team_frame = team_frame.set_index('Team')
101
+ try:
102
+ st.dataframe(team_frame.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(game_format, precision=2), use_container_width = True)
103
+ except:
104
+ st.dataframe(team_frame.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(precision=2), use_container_width = True)
105
  if line_var1 == 'American':
106
  team_frame = team_frame[['Team', 'Opp', 'Win Line', 'Vegas Line', 'Line Diff', 'PD Spread', 'Vegas Spread', 'Spread Diff']]
107
  team_frame = team_frame.set_index('Team')