Skip to content

[Python] Keep the Series name in DataFrame Series.agg with a list - #40573

Merged
claudevdm merged 1 commit into
apache:masterfrom
anishmehta24:fix/series-agg-list-name
Oct 14, 2026
Merged

claudevdm merged 1 commit into
apache:masterfrom
anishmehta24:fix/series-agg-list-name

Conversation

@anishmehta24

Copy link
Copy Markdown
Contributor

Fixes #40572

Hand-implemented aggregations (mean, std, var, ...) inside a list were wrapped with pd.Series(x, index=[base_func]) without a name, so s.agg(['sum', 'mean']) lost the Series name. The wrapper now passes the name from the proxy. Added test_series_agg_list_keeps_name (fails on master); frames_test.py and pandas_doctests_test.py pass.

Written with help from Claude.

@codecov

codecov Bot commented Oct 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.94%. Comparing base (76f6e6d) to head (cafc44d).
⚠️ Report is 160 commits behind head on master.

Additional details and impacted files
@@              Coverage Diff              @@
##             master   #40573       +/-   ##
=============================================
+ Coverage     56.16%   79.94%   +23.77%     
=============================================
  Files          1124      488      -636     
  Lines        178336    82348    -95988     
  Branches       1489        0     -1489     
=============================================
- Hits         100170    65830    -34340     
+ Misses        75645    16518    -59127     
+ Partials       2521        0     -2521     
Flag Coverage Δ
go ?
java ?
python 79.94% <100.00%> (+0.38%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

Copy link
Copy Markdown
Contributor

Assigning reviewers:

R: @claudevdm for label python.
Backup reviewer: jrmccluskey (if the main reviewer is unresponsive, you can escalate to them by tagging their username)

Note: If you would like to opt out of this review, comment assign to next reviewer.

Available commands:

  • stop reviewer notifications - opt out of the automated review tooling
  • remind me after tests pass - tag the comment author after tests pass
  • waiting on author - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)

The PR bot will only process comments in the main thread (not review comments).

@claudevdm
claudevdm merged commit 1d3bc62 into apache:master Oct 14, 2026
85 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: DataFrame API Series.agg with a list drops the Series name for mean, std, var

2 participants