Skip to content

Commit

Permalink
MNT: fix deprecated inplace operation after chained locator access an…
Browse files Browse the repository at this point in the history
…d bump min pandas version
  • Loading branch information
theOehrly committed Feb 4, 2024
1 parent 27dedbf commit fd2fb60
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 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
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ requires-python = ">=3.8"
dependencies = [
"matplotlib>=3.5.1,<4.0.0",
"numpy>=1.21.5,<2.0.0",
"pandas>=1.3.5,<3.0.0",
"pandas>=1.4.1,<3.0.0",
"python-dateutil",
"requests>=2.28.1",
"requests-cache>=1.0.0",
Expand Down
2 changes: 1 addition & 1 deletion requirements/minver.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
matplotlib==3.5.1
numpy==1.21.5
pandas==1.3.5
pandas==1.4.1
requests==2.28.1
requests-cache==1.0.0
scipy==1.7.3
Expand Down

0 comments on commit fd2fb60

Please sign in to comment.