Skip to content
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

TST (string dtype): resolve all easy xfails in pandas/tests/groupby #60314

Merged

Conversation

jorisvandenbossche
Copy link
Member

@jorisvandenbossche jorisvandenbossche commented Nov 14, 2024

There are a few remaining xfails that are harder to fix (require some investigation or probably an actual code fix, added some comments where I have a clue for the reason), but for the rest this resolves most xfails in pandas/tests/groupby

xref #54792

@jorisvandenbossche jorisvandenbossche added the Strings String extension data type and string data label Nov 14, 2024
@jorisvandenbossche jorisvandenbossche added this to the 2.3 milestone Nov 14, 2024
Comment on lines 357 to 362
def bad(x):
assert len(x.values.base) > 0
if isinstance(x.values, np.ndarray):
assert len(x.values.base) > 0
return "foo"

result = data.groupby(["A", "B"]).agg(bad)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be honest, I am not entirely sure about the purpose of this test. Essentially it compares lambda x: "foo" passed to agg as a lambda vs a plain function, except for this assert in the function (but I don't think that should alter how this is executed?)

This was introduced in 71e9046

@mroeschke mroeschke merged commit c4a2026 into pandas-dev:main Nov 14, 2024
54 of 55 checks passed
@mroeschke
Copy link
Member

Thanks @jorisvandenbossche

Copy link

lumberbot-app bot commented Nov 14, 2024

Owee, I'm MrMeeseeks, Look at me.

There seem to be a conflict, please backport manually. Here are approximate instructions:

  1. Checkout backport branch and update it.
git checkout 2.3.x
git pull
  1. Cherry pick the first parent branch of the this PR on top of the older branch:
git cherry-pick -x -m1 c4a20261c337d68dc470fb6fd6a5505e2c7348d0
  1. You will likely have some merge/cherry-pick conflict here, fix them and commit:
git commit -am 'Backport PR #60314: TST (string dtype): resolve all easy xfails in pandas/tests/groupby'
  1. Push to a named branch:
git push YOURFORK 2.3.x:auto-backport-of-pr-60314-on-2.3.x
  1. Create a PR against branch 2.3.x, I would have named this PR:

"Backport PR #60314 on branch 2.3.x (TST (string dtype): resolve all easy xfails in pandas/tests/groupby)"

And apply the correct labels and milestones.

Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon!

Remember to remove the Still Needs Manual Backport label once the PR gets merged.

If these instructions are inaccurate, feel free to suggest an improvement.

@jorisvandenbossche
Copy link
Member Author

Manual backport -> #60317

mroeschke pushed a commit that referenced this pull request Nov 14, 2024
…s/tests/groupby (#60314) (#60317)

TST (string dtype): resolve all easy xfails in pandas/tests/groupby (#60314)

(cherry picked from commit c4a2026)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Strings String extension data type and string data
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants