File size: 433 Bytes
c49dda4 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
import fastf1
import time
import json
from pprint import pprint
from tqdm.std import tqdm
year_team_mapping = {}
for year in tqdm(range(2025, 1950, -1)):
constructor_standings = fastf1.ergast.Ergast().get_constructor_standings(year).content[0]
year_team_mapping[year] = list(constructor_standings["constructorName"])
time.sleep(1)
with open("year_driver_mapping.json", "w") as f:
json.dump(year_team_mapping, f)
|