Skip to content

Conversation

divya1974
Copy link
Contributor

@divya1974 divya1974 commented Oct 8, 2025

Ran tests:
Groupby tests: 29766 passed, 440 skipped, 45 xfailed, 39 xpassed, 1 warning.
Window tests (with Numba disabled to avoid an env crash): 9869 passed, 28 skipped, 91 xfailed.
Frame reductions tests: 2338 passed, 2 xfailed.
No real test failures (only xfails/skips) after applying the deprecation behavior.

Changes
Implemented the deprecation approach for numeric_only=None during the 2.x cycle:

  • Added deprecate_numeric_only_none helper in _validators.py
  • Wired the helper + validate_bool_kwarg(..., none_allowed=True) into:
    frame.py : (DataFrame._reduce)
    series.py : (Series._reduce)
    groupby.py :(GroupBy._cython_agg_general)
    rolling.py : (Rolling._validate_numeric_only)
  • Updated tests in [test_reductions.py] to assert the deprecation warning using tm.assert_produces_warning
  • Added a whatsnew note in v2.1.0.rst documenting the deprecation.

…ne during 2.x)\n\nAdds a centralized helper that emits a PandasFutureWarning for numeric_only=None to support a warn-first migration (GH#53098).
…recate_numeric_only_none and validate_bool_kwarg at central reduction entry points (DataFrame._reduce, Series._reduce, GroupBy._cython_agg_general, Rolling._validate_numeric_only). Emit PandasFutureWarning for numeric_only=None (GH#53098).
…numeric_only=None using tm.assert_produces_warning
@divya1974 divya1974 requested a review from rhshadrach as a code owner October 8, 2025 23:54
@divya1974
Copy link
Contributor Author

I see some tests failing, which I couldn't catch locally. Any suggestion on what I am missing will be helpful.

@Alvaro-Kothe
Copy link
Member

Some of them can be fixed if you merge from main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ERR: numeric_only in reduction operations should disallow passing non-bools

2 participants