James McCool commited on
Commit
25af322
·
1 Parent(s): 16cee53

Refine player ID processing in app.py: update Fanduel data frame to split player IDs at the last hyphen, ensuring accurate mapping and improving data integrity during export.

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -115,7 +115,7 @@ def load_overall_stats():
115
  sd_raw = raw_display.sort_values(by='Median', ascending=False)
116
  dk_sd_raw = sd_raw[sd_raw['site'] == 'Draftkings']
117
  fd_sd_raw = sd_raw[sd_raw['site'] == 'Fanduel']
118
- fd_sd_raw['player_ID'] = fd_sd_raw['player_ID'][:-4].astype(str)
119
 
120
  print(sd_raw.head(10))
121
 
 
115
  sd_raw = raw_display.sort_values(by='Median', ascending=False)
116
  dk_sd_raw = sd_raw[sd_raw['site'] == 'Draftkings']
117
  fd_sd_raw = sd_raw[sd_raw['site'] == 'Fanduel']
118
+ fd_sd_raw['player_ID'] = fd_sd_raw['player_ID'].str.rsplit('-', 1).str[0].astype(str)
119
 
120
  print(sd_raw.head(10))
121