James McCool
commited on
Commit
·
351e940
1
Parent(s):
a019681
Refactor app.py to update player ID mapping for NBA and NFL datasets. Changed key from 'player_id' to 'Player' in the dictionary creation for improved data consistency and accuracy in player projections.
Browse files
app.py
CHANGED
@@ -80,10 +80,10 @@ def init_baselines():
|
|
80 |
except:
|
81 |
nfl_dk_timestamp = nfl_fd_sd_raw['timestamp'].values[0]
|
82 |
|
83 |
-
nba_dk_id_dict = dict(zip(nba_dk_sd_raw['
|
84 |
-
nfl_dk_id_dict = dict(zip(nfl_dk_sd_raw['
|
85 |
-
nba_fd_id_dict = dict(zip(nba_fd_sd_raw['
|
86 |
-
nfl_fd_id_dict = dict(zip(nfl_fd_sd_raw['
|
87 |
|
88 |
return nba_dk_sd_raw, nba_fd_sd_raw, nfl_dk_sd_raw, nfl_fd_sd_raw, nba_timestamp, nfl_dk_timestamp, nba_dk_id_dict, nfl_dk_id_dict, nba_fd_id_dict, nfl_fd_id_dict
|
89 |
|
|
|
80 |
except:
|
81 |
nfl_dk_timestamp = nfl_fd_sd_raw['timestamp'].values[0]
|
82 |
|
83 |
+
nba_dk_id_dict = dict(zip(nba_dk_sd_raw['Player'], nba_dk_sd_raw['player_id']))
|
84 |
+
nfl_dk_id_dict = dict(zip(nfl_dk_sd_raw['Player'], nfl_dk_sd_raw['player_id']))
|
85 |
+
nba_fd_id_dict = dict(zip(nba_fd_sd_raw['Player'], nba_fd_sd_raw['player_id']))
|
86 |
+
nfl_fd_id_dict = dict(zip(nfl_fd_sd_raw['Player'], nfl_fd_sd_raw['player_id']))
|
87 |
|
88 |
return nba_dk_sd_raw, nba_fd_sd_raw, nfl_dk_sd_raw, nfl_fd_sd_raw, nba_timestamp, nfl_dk_timestamp, nba_dk_id_dict, nfl_dk_id_dict, nba_fd_id_dict, nfl_fd_id_dict
|
89 |
|