Repository navigation
MAINT: Remove deprecated pandas inplace= arguments - #4171
Open
thaliamontreux wants to merge 1 commit into
Open
thaliamontreux wants to merge 1 commit into
thaliamontreux wants to merge 1 commit into
Conversation
Pandas 4 (PDEP-8) removes the inplace argument from DataFrame methods, and pandas-dev now emits Pandas4Warning for every use, which fails the nightly test suite. Reassign the returned frames instead -- identical behavior on all supported pandas versions. Sites fixed: - src/metpy/io/metar.py: set_index, rename, drop_duplicates - tests/io/test_gempak.py: sort_index - tests/plots/test_declarative.py: rename (x2)
thaliamontreux
requested review from
dopplershift
and removed request for
a team
October 20, 2026 07:45
Author
|
Note for reviewers: the three failing macOS legs are pre-existing on |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Removes all uses of the deprecated
inplace=argument on pandas DataFramemethods. Pandas 4 removes the argument entirely (PDEP-8)
and pandas-dev raises
Pandas4Warningfor each call, which fails thenightly test suite (#4070 -- the
test_gempak_surface_fileleg).Reassigns the returned frames instead, which is behavior-identical on
all supported pandas versions.
Sites fixed
src/metpy/io/metar.py:set_index,rename,drop_duplicatestests/io/test_gempak.py:sort_indextests/plots/test_declarative.py:rename(x2)Checklist
tests/io/test_metar.py)NumPy 2.5
.shapedeprecation inside cartopyimg_transform,matplotlib image-baseline drift, xarray-dev attrs churn)