James McCool commited on
Commit
34a05eb
·
1 Parent(s): 6e328e4

Update player ID processing in app.py: convert player_ID column to string type in Fanduel data frame to ensure consistent data handling and prevent type-related issues during processing.

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -143,6 +143,7 @@ def load_overall_stats(league: str):
143
  sd_raw = raw_display.sort_values(by='Median', ascending=False)
144
  dk_sd_raw = sd_raw[sd_raw['site'] == 'Draftkings']
145
  fd_sd_raw = sd_raw[sd_raw['site'] == 'Fanduel']
 
146
  fd_sd_raw['player_ID'] = fd_sd_raw['player_ID'].str.rsplit('-', n=1).str[0].astype(str)
147
 
148
  print(sd_raw.head(10))
 
143
  sd_raw = raw_display.sort_values(by='Median', ascending=False)
144
  dk_sd_raw = sd_raw[sd_raw['site'] == 'Draftkings']
145
  fd_sd_raw = sd_raw[sd_raw['site'] == 'Fanduel']
146
+ fd_sd_raw['player_ID'] = fd_sd_raw['player_ID'].astype(str)
147
  fd_sd_raw['player_ID'] = fd_sd_raw['player_ID'].str.rsplit('-', n=1).str[0].astype(str)
148
 
149
  print(sd_raw.head(10))