-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: Fixed nlargest/smallest functionality for dataframes with MultiIndex columns #23034
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
Conversation
Hello @KristianHolsheimer! Thanks for submitting the PR.
|
tests |
Codecov Report
@@ Coverage Diff @@
## master #23034 +/- ##
=======================================
Coverage 92.22% 92.22%
=======================================
Files 169 169
Lines 50903 50903
=======================================
Hits 46946 46946
Misses 3957 3957
Continue to review full report at Codecov.
|
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.
pls add a whatsnew note (bug fixes, reshaping)
pandas/tests/frame/test_analytics.py
Outdated
df = pd.DataFrame( | ||
columns=pd.MultiIndex.from_product([['x'], ['a', 'b']]), | ||
data=[[0.33, 0.13], [0.86, 0.25], [0.25, 0.70], [0.85, 0.91]]) | ||
pd.util.testing.assert_frame_equal( |
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.
just use tm.assert_frame_equal
its already imported.
use
result =
expected =
tm.assert_frame_equal(result, expected)
put a comment for each case (if needed, may not be here)
lgtm. ping on green. |
@jreback I'd been away from my PRs for a few days. I fixed a merge conflict in the whatsnew doc, but didn't do anything else. This triggered the tests and some of them are failing now. They fail on stuff I never touched, though ( Do you know what's going on? Thanks, |
retest this please |
Can you try merging master? |
dae29ef
to
4462ae5
Compare
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.
small change. ping when pushed.
… nlargest/smallest functionality for dataframes with MultiIndex columns.
4462ae5
to
f77f164
Compare
@jreback I pushed my changes a few hours ago. Tests are still pending. |
thanks |
Thanks for reviewing |
This change fixes nlargest/smallest functionality for dataframes with MultiIndex columns.
git diff upstream/master -u -- "*.py" | flake8 --diff