Laps and Lap classes provide comprehensive timing information for every lap driven in a session.
Overview
After loading a session, lap timing data is accessible through thesession.laps property:
The Laps Class
TheLaps class extends pandas DataFrame with specialized methods for filtering and analyzing lap data.
Available Lap Data
Each lap contains the following information:timedelta
Session time when the lap was completed
str
Driver’s three-letter abbreviation (e.g., ‘VER’, ‘HAM’)
str
Driver’s number as a string (e.g., ‘1’, ‘44’)
timedelta
Total lap time
float
Lap number in the session
float
Stint number (1, 2, 3, etc.)
timedelta
Session time when the car left the pit lane
timedelta
Session time when the car entered the pit lane
timedelta
Sector 1 time
timedelta
Sector 2 time
timedelta
Sector 3 time
timedelta
Session time when Sector 1 was completed
timedelta
Session time when Sector 2 was completed
timedelta
Session time when Sector 3 was completed
float
Speed at intermediate point 1 (km/h)
float
Speed at intermediate point 2 (km/h)
float
Speed at finish line (km/h)
float
Speed at speed trap (km/h)
bool
Whether this lap is the driver’s personal best
str
Tire compound: ‘SOFT’, ‘MEDIUM’, ‘HARD’, ‘INTERMEDIATE’, ‘WET’
float
Number of laps completed on this set of tires
bool
Whether the tires are new
str
Team name
timedelta
Session time when the lap started
datetime
Absolute date/time when the lap started
str
Track status codes during the lap (e.g., ‘1’ = green, ‘4’ = yellow, ‘5’ = red)
float
Race position (for race sessions)
bool
Whether the lap time was deleted (track limits, etc.)
str
Reason the lap was deleted
bool
Whether FastF1 generated this lap (e.g., for crashes)
bool
Whether the lap timing is considered accurate
Filtering Laps
TheLaps class provides several methods to filter and select specific laps:
pick_drivers()
Select laps from specific driver(s):pick_teams()
Select laps from specific team(s):pick_laps()
Select specific lap number(s):pick_fastest()
Find the fastest lap:bool
default:"False"
If
False, returns the fastest lap marked as personal best. If True, returns the lap with the lowest time regardless of personal best status.Returns
None if no qualifying lap is found (when only_by_time=False) or if there are no laps.Chaining Filters
Filter methods can be chained together:Advanced Filtering
Use pandas operations for custom filtering:Qualifying-Specific Methods
For qualifying sessions, additional methods are available:pick_quicklaps()
Select only “quick” laps (within 107% of fastest):split_qualifying_sessions()
Split laps into Q1, Q2, Q3:pick_accurate()
Filter to only accurate laps:The Lap Class
A single lap is represented by theLap class (extends pandas Series):
Getting Telemetry from a Lap
Each lap can provide its telemetry data:Practical Examples
Compare Fastest Laps
Analyze Sector Times
Tire Strategy Analysis
Lap Time Evolution
Weather Impact Analysis
Deleted Laps
Working with Lap Collections
Accessing Telemetry for Multiple Laps
Iterating Over Laps
Performance Notes
Filter Before Accessing Telemetry
Filter Before Accessing Telemetry
Always filter laps before getting telemetry to avoid loading unnecessary data:
Use Cached Properties
Use Cached Properties
The
telemetry property is cached, while get_telemetry() computes fresh:Related Topics
- Telemetry - Working with telemetry data from laps
- Loading Data - Understanding what data is loaded
- Sessions and Events - Getting session and event objects
