Repository navigation
Pandas 3.2: DataFrame.iterrows is deprecated - #12724
Merged
Merged
Conversation
Contributor
Unit Test ResultsSee test report for an extended history of previous test failures. This is useful for diagnosing flaky tests. 29 files ±0 29 suites ±0 6h 21m 12s ⏱️ - 19m 5s Results for commit 7d98609. ± Comparison against base commit 025d6ac. ♻️ This comment has been updated with latest results. |
crusaderky
force-pushed
the
fix/pandas-iterrows-warning
branch
from
November 13, 2026 14:03
ab8f029 to
8b9db0e
Compare
The previous commit added a suite-wide ``filterwarnings`` ignore for the pandas 3.2 ``DataFrame.iterrows`` deprecation. Dask's ``iterrows`` yields from the pandas implementation, so the warning is a real signal that dask exposes an API which pandas is removing; a global ignore would also swallow it for any unrelated test that touches ``iterrows``. Revert the pyproject.toml ignore and instead gate the two affected tests on the new ``PANDAS_GE_320`` flag, asserting with ``pytest.warns(Pandas4Warning, match="iterrows is deprecated")`` that the deprecation reaches the caller on pandas 3.2 and later.
DataFrame.iterrows is deprecated
crusaderky
marked this pull request as ready for review
November 13, 2026 15:16
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.
The pandas nightly (3.2.0.dev0) deprecated
DataFrame.iterrows:This affects:
dask/dataframe/tests/test_dataframe.py::test_dataframe_iterrowsdask/dataframe/dask_expr/tests/test_collection.py::test_dataframe_iterrowsChange
PANDAS_GE_320version flag next to the existingPANDAS_GE_*flags indask/_pandas_compat.py, re-exported fromdask/dataframe/_compat.py.pytest.warns(Pandas4Warning, match="iterrows is deprecated").