Skip to content

Conversation

@OlivierCavadenti
Copy link
Contributor

tm.assert_frame_equal(res, expected)


def test_groupby_aggregate_directory():
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 parameterize over of the reduction kernels (use reduction_func)
and parameterize using frame_or_series

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi, thanks for the review.
I add reduction_func parameters and I try with frame_or_series parameter but it's seems that using a dictionary on a series for aggregation raise a "nested renamer is not supported" (seems deprecated in #15931 but now raise error).
Say me if I miss something (it's my first contribution).

@jreback jreback added Dtype Conversions Unexpected or buggy dtype conversions Groupby Testing pandas testing functions or related to the test suite labels Oct 7, 2021
@OlivierCavadenti
Copy link
Contributor Author

https://github.com/pandas-dev/pandas/pull/43915/checks?check_run_id=3885731836 fail, I check but I dont understand why in my code impact that.

Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

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

pls merge master as well


def test_groupby_aggregate_directory(reduction_func):
# GH#32793
if reduction_func not in ["corrwith", "nth"]:
Copy link
Contributor

Choose a reason for hiding this comment

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

just do a return if the reduction_func is in rather than this big if

if reduction_func not in ["corrwith", "nth"]:
obj = DataFrame([[0, 1], [0, np.nan]])

obj.convert_dtypes()
Copy link
Contributor

Choose a reason for hiding this comment

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

what are you expecting this to do?

@jreback jreback added this to the 1.4 milestone Oct 29, 2021
@jreback jreback merged commit 7bf75b0 into pandas-dev:master Oct 29, 2021
@jreback
Copy link
Contributor

jreback commented Oct 29, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Dtype Conversions Unexpected or buggy dtype conversions Groupby Testing pandas testing functions or related to the test suite

2 participants