diff --git a/fastf1/_api.py b/fastf1/_api.py index b5a9d73ae..9d07fa72e 100644 --- a/fastf1/_api.py +++ b/fastf1/_api.py @@ -1180,7 +1180,8 @@ def position_data(path, response=None, livedata=None): .merge(most_complete_ref, how='outer') \ .sort_values(by='Date') \ .reset_index(drop=True) - data[drv]['Status'].fillna(value='OffTrack', inplace=True) + data[drv]['Status'] = data[drv]['Status'] \ + .fillna(value='OffTrack', inplace=False) data[drv].loc[:, ['X', 'Y', 'Z']] = \ data[drv].loc[:, ['X', 'Y', 'Z']]\ .fillna(value=0, inplace=False) diff --git a/fastf1/core.py b/fastf1/core.py index 34c512aa0..9da299703 100644 --- a/fastf1/core.py +++ b/fastf1/core.py @@ -475,7 +475,7 @@ def merge_channels( # now use the previously excluded columns to update the missing values # in the merged dataframe for col in on_both_columns: - merged[col].update(data[col]) + merged.update({col: data[col]}) if 'Driver' in merged.columns and len(merged['Driver'].unique()) > 1: raise ValueError("Cannot merge multiple drivers") diff --git a/pytest.ini b/pytest.ini index 523e4ddb3..5ca47fdf9 100644 --- a/pytest.ini +++ b/pytest.ini @@ -46,5 +46,4 @@ filterwarnings = # TODO: temp, should be resolved with pandas 2.2.1 ignore:Passing a (Single)?BlockManager to.*:DeprecationWarning # TODO: temp, needs to be actually fixed before pandas 3.0.0 - ignore:A value is trying to be set on a copy of.*:FutureWarning ignore:Downcasting object dtype arrays.*:FutureWarning