Jon Solow
commited on
Commit
·
55a45e7
1
Parent(s):
656be95
Implement fix for games that dont have week_number yet
Browse files- src/stats.py +5 -0
src/stats.py
CHANGED
@@ -355,7 +355,12 @@ def get_yahoo_schedule() -> dict[int, dict[str, dict[str, str | int | pd.Timesta
|
|
355 |
continue
|
356 |
away_team = team_id_to_abbr[game["away_team_id"]]
|
357 |
home_team = team_id_to_abbr[game["home_team_id"]]
|
|
|
|
|
|
|
|
|
358 |
week = YAHOO_WEEK_MAP[int(game["week_number"])]
|
|
|
359 |
if week not in schedule_map:
|
360 |
schedule_map[week] = {}
|
361 |
|
|
|
355 |
continue
|
356 |
away_team = team_id_to_abbr[game["away_team_id"]]
|
357 |
home_team = team_id_to_abbr[game["home_team_id"]]
|
358 |
+
|
359 |
+
if "week_number" not in game:
|
360 |
+
continue
|
361 |
+
|
362 |
week = YAHOO_WEEK_MAP[int(game["week_number"])]
|
363 |
+
|
364 |
if week not in schedule_map:
|
365 |
schedule_map[week] = {}
|
366 |
|