Third Fastest Marathon Time
Problem
A race organiser records each runner's finishing time in whole minutes.
**DataFrame: `race_finishes`**
| Column | Type |
|----------------|------|
| runner_id | int |
| finish_minutes | int |
`runner_id` is unique. A **faster** runner has a **smaller** `finish_minutes`.
Return a DataFrame with a single column `third_fastest` holding the **3rd fastest distinct** finishing time — that is, the 3rd smallest distinct value.
Input data
Example rows — the live problem includes the full dataset.
| runner_id | finish_minutes |
|---|---|
| 1 | 188 |
| 2 | 195 |
| 3 | 210 |
| 4 | 230 |
Expected output
Your answer should return 1 row with the columns third_fastest.
Starter code (Pandas (Python))
import pandas as pd
def third_fastest_time(race_finishes) -> pd.DataFrame:
# Your code here
return race_finishesSolve this Pandas question free
Write Pandas (Python) and run it instantly in your browser — even on your phone. No signup needed to try.
Solution & explanation
Create a free account to unlock the optimal solution, a step-by-step explanation, and the hidden test cases that grade your answer.
Sign up free to unlock