Skip to main content
The Laps and Lap classes provide access to lap timing data with filtering and telemetry access.

Laps

DataFrame-like object for accessing lap timing data of multiple laps. Constructor:
Session | None
default:"None"
Instance of Session class (required for full functionality)
Available Columns:
  • Time (timedelta64[ns]): Time when the lap was completed
  • Driver (str): Driver three-letter abbreviation
  • DriverNumber (str): Driver number
  • LapTime (timedelta64[ns]): Lap time duration
  • LapNumber (float64): Lap number
  • Stint (float64): Stint number
  • PitOutTime (timedelta64[ns]): Time when car exited pit lane
  • PitInTime (timedelta64[ns]): Time when car entered pit lane
  • Sector1Time (timedelta64[ns]): Sector 1 time
  • Sector2Time (timedelta64[ns]): Sector 2 time
  • Sector3Time (timedelta64[ns]): Sector 3 time
  • Sector1SessionTime (timedelta64[ns]): Session time at sector 1
  • Sector2SessionTime (timedelta64[ns]): Session time at sector 2
  • Sector3SessionTime (timedelta64[ns]): Session time at sector 3
  • SpeedI1 (float64): Speed trap at intermediate 1 (km/h)
  • SpeedI2 (float64): Speed trap at intermediate 2 (km/h)
  • SpeedFL (float64): Speed trap at finish line (km/h)
  • SpeedST (float64): Speed trap at speed trap (km/h)
  • IsPersonalBest (bool): Whether this lap is the driver’s personal best
  • Compound (str): Tyre compound (‘SOFT’, ‘MEDIUM’, ‘HARD’, ‘INTERMEDIATE’, ‘WET’)
  • TyreLife (float64): Laps completed on this set of tyres
  • FreshTyre (bool): Whether tyres were new when fitted
  • Team (str): Team name
  • LapStartTime (timedelta64[ns]): Time when the lap started
  • LapStartDate (datetime64[ns]): Date when the lap started
  • TrackStatus (str): Track status flags during the lap
  • Position (float64): Position at the end of this lap
  • Deleted (bool): Whether the lap time was deleted
  • DeletedReason (str): Reason for deletion
  • FastF1Generated (bool): Whether this lap was generated by FastF1
  • IsAccurate (bool): Whether the lap passed accuracy validation

Filtering Methods

pick_drivers()

Return all laps of the specified driver(s).
int | str | Iterable[int | str]
required
Driver abbreviation(s) or driver number(s) - can be mixed
Laps
Filtered Laps object
Example:

pick_teams()

Return all laps of the specified team(s).
str | Iterable[str]
required
Team name(s)
Laps
Filtered Laps object
Example:

pick_laps()

Return all laps matching specific lap number(s).
int | Iterable[int]
required
Lap number or iterable of lap numbers
Laps
Filtered Laps object
Example:

pick_fastest()

Return the lap with the fastest lap time.
bool
default:"False"
If False, only return laps marked as personal best. If True, ignore personal best flag and return the absolute fastest lap.
Lap | None
The fastest Lap object, or None if no valid lap exists
Example:

pick_quicklaps()

Return all laps faster than a threshold (default: 107% of fastest lap).
float | None
default:"None"
Custom threshold coefficient (e.g., 1.05 for 105%). Defaults to 1.07 (107%).
Laps
Filtered Laps object
Example:

pick_compounds()

Return all laps done on specific tyre compound(s).
str | Iterable[str]
required
Compound name(s): ‘SOFT’, ‘MEDIUM’, ‘HARD’, ‘INTERMEDIATE’, ‘WET’, ‘UNKNOWN’, ‘TEST_UNKNOWN’
Laps
Filtered Laps object
Example:

pick_track_status()

Return all laps set under a specific track status.
str
required
The track status as a string (e.g., ‘1’ for green flag, ‘2’ for yellow flag, ‘4’ for safety car)
str
default:"'equals'"
Matching method: ‘equals’, ‘contains’, ‘excludes’, ‘any’, ‘none’
Laps
Filtered Laps object
Example:

pick_wo_box()

Return all laps which are NOT in-laps or out-laps.
Laps
Filtered Laps object

pick_box_laps()

Return in-laps, out-laps, or both.
str
default:"'both'"
One of ‘in’, ‘out’, or ‘both’
Laps
Filtered Laps object

pick_accurate()

Return all laps which pass accuracy validation.
Laps
Filtered Laps object

pick_not_deleted()

Return all laps whose lap times are NOT deleted.
Laps
Filtered Laps object

Telemetry Methods

get_telemetry()

Get telemetry data for all laps in this Laps object.
int | Literal['original'] | None
default:"None"
Optional frequency to override the default. Either ‘original’ or an integer for frequency in Hz.
Telemetry
Telemetry object with merged car and position data
Laps must contain data from only one driver.

get_car_data()

Get car data (Speed, RPM, Throttle, etc.) for all laps.
Telemetry
Telemetry object with car data only

get_pos_data()

Get position data (X, Y, Z coordinates) for all laps.
Telemetry
Telemetry object with position data only

get_weather_data()

Return weather data for each lap.
pd.DataFrame
DataFrame with weather data for each lap

Other Methods

split_qualifying_sessions()

Split laps into Q1, Q2, and Q3 sessions.
list[Optional[Laps]]
List containing three Laps objects for Q1, Q2, and Q3. Returns None for cancelled sessions.
Example:

iterlaps()

Iterator for iterating over all laps.
Iterable | None
default:"None"
List of required column names. Only yields laps where all required values are non-null.
Example:

Lap

Single lap object (returned when slicing Laps to a single row). Properties: All columns from Laps are accessible as properties on a Lap object. Methods:

get_telemetry()

Get telemetry data for this lap.
int | Literal['original'] | None
default:"None"
Optional frequency override
Telemetry
Telemetry object for this lap

get_car_data()

Get car data for this lap.
Telemetry
Telemetry object with car data

get_pos_data()

Get position data for this lap.
Telemetry
Telemetry object with position data

get_weather_data()

Get weather data for this lap.
pd.Series
Weather data for this lap

Complete Usage Example