-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Pass sort for agg multiple #21062
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pass sort for agg multiple #21062
Conversation
pandas/tests/frame/test_apply.py
Outdated
|
||
tm.assert_frame_equal(result, expected) | ||
|
||
# unsorted index. Still sorts the index for backwards compat |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you mean with "Still sorts the index for backwards compat"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even though we pass .agg(['sum', 'min'])
the result's index is the sorted function names, ['min', 'sum']
. Make sense?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could imaging preserving the function order here someday, but would need to deprecate first.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can update the comment to say "Still sorts the result's index"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, ok, the sorting is about the [sum, min] axis, then I understand
Codecov Report
@@ Coverage Diff @@
## master #21062 +/- ##
=======================================
Coverage 91.82% 91.82%
=======================================
Files 153 153
Lines 49503 49503
=======================================
Hits 45458 45458
Misses 4045 4045
Continue to review full report at Codecov.
|
CI passed. Pushing a clarifying comment and merging. |
[ci skip]
xref #20909