-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: Attributes are lost when subsetting columns in groupby #35444
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
@rhshadrach test is failing on Linux py37_np_dev
|
Hello @rhshadrach! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found: There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2020-08-31 20:16:14 UTC |
Thanks @simonjayhawkins, passing now. |
does this also close: #35014 ? |
@rhshadrach can you merge master and ping on green. |
@jreback master has been merged, failures are unrelated |
restarted
|
wait, what happend to the tests? |
…oup_keys � Conflicts: � doc/source/whatsnew/v1.2.0.rst
pandas/tests/groupby/test_groupby.py
Outdated
result = expected[["b"]] | ||
assert getattr(result, attr) == getattr(expected, attr) | ||
|
||
if attr in ("axis", "as_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.
can you xfail these in the parameter list instead
also if you can add a test that replicates the original issue (unless your new ones cover) |
@jreback test is now xfail instead of skip; original issue is covered by the added test when |
@jreback should have mentioned - if the parameters are labeled xfail, then we wouldn't be testing their behavior for |
I've updated the tests with @arw2019's suggestion. To my surprise, the line
results in a Update: After rethinking, this test shouldn't be xfailed. |
…oup_keys � Conflicts: � doc/source/whatsnew/v1.2.0.rst
thanks @rhshadrach good approach about separating something potentially controversial to another issue. |
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff
Avoiding the behavior of Series here, e.g.
df.groupby('a')['b']
as I think that will involve some API changes. Will follow up: ref #35443