From 1f0fcc9dd384ab1a8c351df37c43ce6269c15c94 Mon Sep 17 00:00:00 2001 From: theOehrly <23384863+theOehrly@users.noreply.github.com> Date: Wed, 9 Oct 2024 19:48:27 +0200 Subject: [PATCH] FIX: errors in tyre data parsing --- fastf1/_api.py | 6 +----- fastf1/core.py | 1 - fastf1/req.py | 2 +- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/fastf1/_api.py b/fastf1/_api.py index b6d912124..02e4f5323 100644 --- a/fastf1/_api.py +++ b/fastf1/_api.py @@ -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 diff --git a/fastf1/core.py b/fastf1/core.py index 508699fe0..dfd4fa576 100644 --- a/fastf1/core.py +++ b/fastf1/core.py @@ -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: diff --git a/fastf1/req.py b/fastf1/req.py index 46cc669b7..8e4094edd 100644 --- a/fastf1/req.py +++ b/fastf1/req.py @@ -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