Skip to content

REF: Move generic methods to aggregation.py #30856

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 16 commits into from
Jan 20, 2020

Conversation

charlesdong1991
Copy link
Member

xref #29116

#29116 (review)

based on @jreback comment, this PR is a precursor PR for #29116 to make PR smaller and more readable

@charlesdong1991 charlesdong1991 added the Refactor Internal refactoring of code label Jan 9, 2020
Copy link
Member

@WillAyd WillAyd left a comment

Choose a reason for hiding this comment

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

lgtm @jreback

@charlesdong1991
Copy link
Member Author

@jreback could you take a look? pls lemme know what changes you want to see here? and then I could start finishing up #29116 after this is merged. Thanks!

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.

looks good, some added typing and fixups of the doc-strings would be good. ping on green.

we can do other things in followons (e.g. making actual logic changes).

return aggspec, columns, col_idx_order


def _make_unique(seq):
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 make this name more verbose: _make_unique_kwarg_list

Copy link
Member Author

Choose a reason for hiding this comment

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

sure, changed!

@@ -633,28 +633,28 @@ def test_lambda_named_agg(func):

class TestLambdaMangling:
Copy link
Contributor

Choose a reason for hiding this comment

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

move all of these tests to pandas/tests/test_aggregation.py

Copy link
Contributor

Choose a reason for hiding this comment

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

just the tests where you are moving the code (e.g. the maybe_mangle.....) and such

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah, I was thinking it as a follow-up, but maybe good to have it in a go here! I moved all tests related to functions in aggregation to pandas/tests/test_aggregation.py

@pep8speaks
Copy link

pep8speaks commented Jan 20, 2020

Hello @charlesdong1991! 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-01-20 22:05:57 UTC

@jreback jreback added this to the 1.1 milestone Jan 20, 2020
@jreback
Copy link
Contributor

jreback commented Jan 20, 2020

lgtm. ping on green.

@jreback jreback merged commit 9a01577 into pandas-dev:master Jan 20, 2020
@jreback
Copy link
Contributor

jreback commented Jan 20, 2020

thanks @charlesdong1991

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Refactor Internal refactoring of code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants