Skip to main content
The races.csv table contains information about every Formula 1 race, including Grand Prix events and session schedules.

Schema

FieldTypeDescription
raceIdintegerUnique identifier for each race
yearintegerSeason year
roundintegerRound number within the season
circuitIdintegerForeign key to circuits.csv
namestringName of the Grand Prix
datedateDate of the race (YYYY-MM-DD)
timetimeRace start time (UTC)
urlstringWikipedia URL for the race
fp1_datedateFree Practice 1 date
fp1_timetimeFree Practice 1 start time (UTC)
fp2_datedateFree Practice 2 date
fp2_timetimeFree Practice 2 start time (UTC)
fp3_datedateFree Practice 3 date
fp3_timetimeFree Practice 3 start time (UTC)
quali_datedateQualifying session date
quali_timetimeQualifying session start time (UTC)
sprint_datedateSprint race date (if applicable)
sprint_timetimeSprint race start time (UTC)
Practice session times (fp1_*, fp2_*, fp3_*) and qualifying times are \N for historical races where this data wasn’t recorded. Sprint fields are \N for races without sprint format.

Sample Data

raceIdyearroundcircuitIdnamedatetime
1200911Australian Grand Prix2009-03-2906:00:00
2200922Malaysian Grand Prix2009-04-0509:00:00
32009317Chinese Grand Prix2009-04-1907:00:00
4200943Bahrain Grand Prix2009-04-2612:00:00

Relationships

References:
  • races.circuitIdcircuits.circuitId
Referenced by:
  • results.raceIdraces.raceId
  • qualifying.raceIdraces.raceId
  • sprint_results.raceIdraces.raceId
  • lap_times.raceIdraces.raceId
  • pit_stops.raceIdraces.raceId
  • driver_standings.raceIdraces.raceId
  • constructor_standings.raceIdraces.raceId

Dataset Statistics

  • Total Records: 1,173 races
  • Date Range: 1950 - Present
  • Races per Season: Varies (typically 15-24)

Example Queries

Get races for a specific season

import pandas as pd

races = pd.read_csv('races.csv')
season_2023 = races[races['year'] == 2023]
print(season_2023[['round', 'name', 'date']])

Find all races at a specific circuit

# Monaco (circuitId = 6)
monaco_races = races[races['circuitId'] == 6]
print(monaco_races[['year', 'date', 'name']])

Count races by year

races_per_year = races.groupby('year').size()
print(races_per_year)

Find sprint race weekends

sprint_races = races[races['sprint_date'].notna()]
print(sprint_races[['year', 'name', 'sprint_date']])

Get upcoming races (if dataset is current)

from datetime import datetime

races['date'] = pd.to_datetime(races['date'])
upcoming = races[races['date'] > datetime.now()]
print(upcoming[['name', 'date', 'time']].head())

Join with circuits for location data

circuits = pd.read_csv('circuits.csv')
races_with_location = races.merge(circuits, on='circuitId')
print(races_with_location[['year', 'name', 'location', 'country']])

Notes

  • All times are stored in UTC format
  • \N represents null values for missing data
  • The sprint race format was introduced in 2021, so earlier races have \N for sprint fields
  • Practice session data is more complete for recent seasons
  • The round field resets to 1 each season
  • Some races may have been cancelled or rescheduled (check results table for actual participation)

Build docs developers (and LLMs) love