Skip to content

Commit

Permalink
FIX: errors in tyre data parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
theOehrly committed Oct 9, 2024
1 parent 7ad8d30 commit 1f0fcc9
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
6 changes: 1 addition & 5 deletions fastf1/_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -860,11 +860,7 @@ def timing_app_data(path, response=None, livedata=None):
data['Driver'][-1] = driver_number
data['Stint'][-1] = stint_number

df = pd.DataFrame(data)
# pandas doesn't correctly infer bool dtype columns, set type explicitly
df[['New', 'TyresNotChanged']] \
= df[['New', 'TyresNotChanged']].astype(bool)
return df
return pd.DataFrame(data)


@Cache.api_request_wrapper
Expand Down
1 change: 0 additions & 1 deletion fastf1/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1463,7 +1463,6 @@ def _load_laps_data(self, livedata=None):
data.drop(columns=['NumberOfPitStops'], inplace=True)
useful = app_data[['Driver', 'Time', 'Compound', 'StartLaps', 'New',
'Stint']]
useful = useful[~useful['Compound'].isnull()]

drivers = self.drivers
if not drivers:
Expand Down
2 changes: 1 addition & 1 deletion fastf1/req.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ class Cache(metaclass=_MetaCache):
"""
_CACHE_DIR = None
# version of the api parser code (unrelated to release version number)
_API_CORE_VERSION = 13
_API_CORE_VERSION = 14
_IGNORE_VERSION = False
_FORCE_RENEW = False

Expand Down

0 comments on commit 1f0fcc9

Please sign in to comment.