James McCool commited on
Commit
3ddfbe1
·
1 Parent(s): be3d85a

Changed Player to Name

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -232,13 +232,13 @@ with tab4:
232
  disp_market['CONSENSUS_Proj'] = disp_market.apply(lambda x: x['Projection'] if x['OddsType'] == 'CONSENSUS' else None, axis=1)
233
 
234
  # Fill forward within groups to populate projection columns
235
- disp_market = disp_market.groupby(['Player', 'PropType']).fillna(method='ffill').fillna(method='bfill')
236
 
237
- # Keep only one row per player/prop combination
238
- disp_market = disp_market.drop_duplicates(subset=['Player', 'PropType'], keep='first')
239
 
240
  # Select and order columns
241
- disp_market = disp_market[['Player', 'Team', 'PropType', 'FANDUEL_Proj', 'DRAFTKINGS_Proj', 'MGM_Proj', 'CONSENSUS_Proj']]
242
 
243
  st.dataframe(disp_market.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(prop_format, precision=2), height = 1000, use_container_width = True)
244
  st.download_button(
 
232
  disp_market['CONSENSUS_Proj'] = disp_market.apply(lambda x: x['Projection'] if x['OddsType'] == 'CONSENSUS' else None, axis=1)
233
 
234
  # Fill forward within groups to populate projection columns
235
+ disp_market = disp_market.groupby(['Name', 'PropType']).fillna(method='ffill').fillna(method='bfill')
236
 
237
+ # Keep only one row per Name/prop combination
238
+ disp_market = disp_market.drop_duplicates(subset=['Name', 'PropType'], keep='first')
239
 
240
  # Select and order columns
241
+ disp_market = disp_market[['Name', 'Team', 'PropType', 'FANDUEL_Proj', 'DRAFTKINGS_Proj', 'MGM_Proj', 'CONSENSUS_Proj']]
242
 
243
  st.dataframe(disp_market.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(prop_format, precision=2), height = 1000, use_container_width = True)
244
  st.download_button(