Skip to main content
The SessionResults and DriverResult classes provide access to driver information and session results.

SessionResults

DataFrame containing session results and driver information for all drivers in a session. Constructor: SessionResults objects are typically accessed through the Session.results property rather than instantiated directly.

Available Columns

Driver Information

  • DriverNumber (str): Driver’s racing number as string
  • BroadcastName (str): Name as shown in broadcasts
  • Abbreviation (str): Three-letter driver abbreviation (e.g., ‘VER’, ‘HAM’, ‘LEC’)
  • FullName (str): Driver’s full name (e.g., ‘Max Verstappen’)
  • FirstName (str): Driver’s first name
  • LastName (str): Driver’s last name
  • HeadshotUrl (str): URL to driver’s headshot image
  • CountryCode (str): Driver’s country code (e.g., ‘NLD’, ‘GBR’)

Team Information

  • TeamName (str): Team name (short version without title sponsors)
  • TeamColor (str): Hex color code associated with the team (e.g., ‘3671C6’ for Red Bull)

API Identifiers

  • DriverId (str): Driver identifier used by Ergast API
  • TeamId (str): Constructor identifier used by Ergast API

Result Information

All Sessions

  • Position (float64): Driver’s finishing position
    • Available for: Race, Qualifying, Sprint, Sprint Shootout, Sprint Qualifying
    • Accounts for post-race penalties and disqualifications in Race/Qualifying/Sprint sessions
    • Uses NaN for DNS (Did Not Start)

Race/Sprint Sessions

  • ClassifiedPosition (str): Official classification result
    • Integer value if officially classified
    • ‘R’ (Retired), ‘D’ (Disqualified), ‘E’ (Excluded), ‘W’ (Withdrawn), ‘F’ (Failed to qualify), ‘N’ (Not classified)
  • GridPosition (float64): Starting grid position
  • Status (str): Finish status or DNF reason
    • Examples: ‘Finished’, ’+ 1 Lap’, ‘Crash’, ‘Gearbox’, ‘Engine’
  • Time (timedelta64[ns]): Total race time
    • Only available if driver was not more than one lap behind the leader
  • Points (float64): Championship points earned
  • Laps (float64): Number of laps completed

Qualifying Sessions

  • Q1 (timedelta64[ns]): Best Q1 lap time
  • Q2 (timedelta64[ns]): Best Q2 lap time
  • Q3 (timedelta64[ns]): Best Q3 lap time
SessionResults is indexed by driver number and sorted by finishing position by default.

Usage with Session

Accessing Results:
Output:

Filtering and Querying


Qualifying Results

Output:

DriverResult

Series containing result information for a single driver. Accessing DriverResult: DriverResult objects are obtained by:
  1. Using Session.get_driver(identifier)
  2. Slicing SessionResults to a single row

DriverResult Properties

All columns from SessionResults are accessible as properties:

dnf Property

Check if a driver did not finish.
bool
True if driver did not finish (DNF)

Complete Usage Example