Skip to content

Commit

Permalink
MNT: fix deprecated inplace operation after chained locator access
Browse files Browse the repository at this point in the history
  • Loading branch information
theOehrly committed Feb 1, 2024
1 parent d645a40 commit 1de8383
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
3 changes: 2 additions & 1 deletion fastf1/_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion fastf1/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
1 change: 0 additions & 1 deletion pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 1de8383

Please sign in to comment.