Skip to content

Commit

Permalink
DOC: Clean up incompleteness/inconsistency (#684)
Browse files Browse the repository at this point in the history
* Update docstrings to include unknown compounds

`pick_compounds` method docstring is updated. Explanation given in the `Laps` class docstring.

Closes #673

* Unify dataframe docstring to use `str` type

Closes #683
  • Loading branch information
Casper-Guo authored Feb 7, 2025
1 parent 03917bd commit 3d58292
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions fastf1/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -2609,7 +2609,7 @@ class Laps(BaseDataFrame):
- **Time** (pandas.Timedelta): Session time when the lap time was
set (end of lap)
- **Driver** (string): Three letter driver identifier
- **Driver** (str): Three letter driver identifier
- **DriverNumber** (str): Driver number
- **LapTime** (pandas.Timedelta): Recorded lap time.
To see if a lap time was deleted, check the **Deleted** column.
Expand Down Expand Up @@ -2638,8 +2638,10 @@ class Laps(BaseDataFrame):
the quicker lap is invalid and not counted. For example, this can
happen if the track limits were exceeded.
- **Compound** (str): Tyres event specific compound name: SOFT, MEDIUM,
HARD, INTERMEDIATE, WET (the actual underlying compounds C1 to C5 are
not differentiated).
HARD, INTERMEDIATE, WET, TEST_UNKNOWN, UNKNOWN.
The actual underlying compounds C1 to C5 are not differentiated.
TEST_UNKNOWN compounds can appear in the data during pre-season
testing and in-season Pirelli tyre tests.
- **TyreLife** (float): Laps driven on this tire (includes laps in
other sessions for used sets of tires)
- **FreshTyre** (bool): Tyre had TyreLife=0 at stint start, i.e.
Expand Down Expand Up @@ -3159,7 +3161,7 @@ def pick_tyre(self, compound: str) -> "Laps":
Args:
compound: may be "SOFT", "MEDIUM", "HARD",
"INTERMEDIATE" or "WET"
"INTERMEDIATE", "WET", "UNKNOWN", or "TEST_UNKNOWN"
Returns:
instance of :class:`Laps`
Expand All @@ -3177,7 +3179,8 @@ def pick_compounds(self, compounds: Union[str, Iterable[str]]) -> "Laps":
slick_laps = session_laps.pick_compounds(['SOFT', 'MEDIUM', "HARD])
Args:
compounds: may be "SOFT", "MEDIUM", "HARD", "INTERMEDIATE" or "WET"
compounds: may be "SOFT", "MEDIUM", "HARD", "INTERMEDIATE", "WET",
"UNKNOWN", or "TEST_UNKNOWN"
Returns:
instance of :class:`Laps`
Expand Down

0 comments on commit 3d58292

Please sign in to comment.