The first time you access .laps, tif1 fetches the data in parallel. Subsequent calls are instant due to the caching layer.
# Load all lapslaps = session.laps# View driver informationprint(session.drivers_df[["Driver", "Team", "DriverNumber"]])# Get the top 5 fastest laps in the sessionfastest_5 = laps.nsmallest(5, "LapTime")print(fastest_5[["Driver", "LapTime", "Compound"]])
You can easily drill down into data for a specific driver using their 3-letter code.
# Get driver data for Max Verstappenver = session.get_driver("VER")# Get his fastest lapfastest_lap = ver.get_fastest_lap()print(f"Max's fastest lap: {fastest_lap['LapTime'].iloc[0]:.3f}s")
Telemetry provides high-frequency data (Speed, RPM, Throttle, etc.) for every moment of a lap.
# Get telemetry for lap 19lap_19 = ver.get_lap(19)telemetry = lap_19.telemetry# Check his top speed on that laptop_speed = telemetry["Speed"].max()print(f"Top Speed on Lap 19: {top_speed} km/h")
Not sure what events or sessions are available? Use the helper functions.
# List all GPs in 2025events = tif1.get_events(2025)# List all sessions for a GPsessions = tif1.get_sessions(2025, "British Grand Prix")# ['Practice 1', 'Practice 2', 'Practice 3', 'Qualifying', 'Race']