Skip to content

Commit

Permalink
Add pick_inlaps() and pick_outlaps() functions
Browse files Browse the repository at this point in the history
  • Loading branch information
pesaventofilippo authored Sep 27, 2023
1 parent dd6b4c5 commit 6a27d1b
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions fastf1/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -2908,6 +2908,22 @@ def pick_wo_box(self) -> "Laps":
"""
return self[pd.isnull(self['PitInTime']) & pd.isnull(self['PitOutTime'])]

def pick_inlaps(self) -> "Laps":
"""Return all laps which are in laps (driver entered the pit lane).
Returns:
instance of :class:`Laps`
"""
return self[~pd.isnull(self['PitInTime'])]

def pick_outlaps(self) -> "Laps":
"""Return all laps which are out laps (driver exited the pit lane).
Returns:
instance of :class:`Laps`
"""
return self[~pd.isnull(self['PitOutTime'])]

def pick_not_deleted(self) -> "Laps":
"""Return all laps whose lap times are NOT deleted.
Expand Down

0 comments on commit 6a27d1b

Please sign in to comment.