James McCool commited on
Commit
f5130d3
·
1 Parent(s): 6c19bf2

Add slate-specific filtering in app.py to refine player data based on selected slate type (Main, Secondary, Auxiliary), improving lineup generation accuracy.

Browse files
Files changed (1) hide show
  1. app.py +7 -0
app.py CHANGED
@@ -416,6 +416,13 @@ with tab2:
416
  player_roo_raw['Site'] = 'Draftkings'
417
  elif site_var == 'Fanduel':
418
  player_roo_raw['Site'] = 'Fanduel'
 
 
 
 
 
 
 
419
 
420
  if team_select2:
421
  player_roo_raw = player_roo_raw[player_roo_raw['Team'].isin(team_select2)]
 
416
  player_roo_raw['Site'] = 'Draftkings'
417
  elif site_var == 'Fanduel':
418
  player_roo_raw['Site'] = 'Fanduel'
419
+
420
+ if slate_var2 == 'Main':
421
+ player_roo_raw = player_roo_raw[player_roo_raw['Slate'] == 'DK SD1']
422
+ elif slate_var2 == 'Secondary':
423
+ player_roo_raw = player_roo_raw[player_roo_raw['Slate'] == 'DK SD2']
424
+ elif slate_var2 == 'Auxiliary':
425
+ player_roo_raw = player_roo_raw[player_roo_raw['Slate'] == 'DK SD3']
426
 
427
  if team_select2:
428
  player_roo_raw = player_roo_raw[player_roo_raw['Team'].isin(team_select2)]