Skip to content

TST: Test aggregate with list values #25581 #47559

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

Merged
merged 5 commits into from
Jul 5, 2022

Conversation

srotondo
Copy link
Contributor

@srotondo srotondo commented Jul 1, 2022

@pep8speaks
Copy link

pep8speaks commented Jul 1, 2022

Hello @srotondo! 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 2022-07-05 20:53:06 UTC

Copy link
Member

@phofl phofl left a comment

Choose a reason for hiding this comment

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

you can run pre-commit locally to avoid these issues


def test_agg_of_list():
# GH#25581
df1 = DataFrame([[20, "A"], [20, "B"], [30, "C"]])
Copy link
Member

Choose a reason for hiding this comment

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

Could you add the other cases from the issue too?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

From the issue there are 3 other test cases than the one I originally added. I can add 2 of them, but the final test case still fails on the master with a different error message than in 1.4.1.

@jreback jreback added Testing pandas testing functions or related to the test suite Groupby Algos Non-arithmetic algos: value_counts, factorize, sorting, isin, clip, shift, diff labels Jul 3, 2022
@@ -1413,3 +1413,14 @@ def test_multi_axis_1_raises(func):
gb = df.groupby("a", axis=1)
with pytest.raises(NotImplementedError, match="axis other than 0 is not supported"):
gb.agg(func)


def test_agg_of_list():
Copy link
Contributor

Choose a reason for hiding this comment

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

can you add mode in the test name as well

@mroeschke mroeschke added this to the 1.5 milestone Jul 5, 2022
@mroeschke mroeschke merged commit 37e6239 into pandas-dev:main Jul 5, 2022
@mroeschke
Copy link
Member

Thanks @srotondo

yehoshuadimarsky pushed a commit to yehoshuadimarsky/pandas that referenced this pull request Jul 13, 2022
* TST: Test aggregate with list values pandas-dev#25581

* TST: Fixed PEP 8 warnings pandas-dev#25581

* TST: Fixed Flake8 Error pandas-dev#25581

* TST: Added more test cases pandas-dev#25581

* TST: Changed broken test to xfail pandas-dev#25581

Co-authored-by: Steven Rotondo <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Algos Non-arithmetic algos: value_counts, factorize, sorting, isin, clip, shift, diff Groupby Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inconsistent behavior when using GroupBy and pandas.Series.mode
6 participants