Skip to content

DOC: Fixed examples in pandas/core/aggregation.py #33263

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

Conversation

ShaharNaveh
Copy link
Member

  • closes #xxxx
  • tests added / passed
  • passes black pandas
  • passes git diff upstream/master -u -- "*.py" | flake8 --diff
  • whatsnew entry

>>> normalize_keyword_aggregation({'output': ('input', 'sum')})
({'input': ['sum']}, ('output',), [('input', 'sum')])
>>> normalize_keyword_aggregation({"output": ("input", "sum")})
(defaultdict(<class 'list'>, {'input': ['sum']}), ('output',), array([0]))
Copy link
Member

Choose a reason for hiding this comment

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

hmm, this output doesn't match the returns section/return type hint.

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member

@datapythonista datapythonista left a comment

Choose a reason for hiding this comment

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

Probably better to split the changes to the examples from the changes to the typing. I guess they're unrelated.

@@ -52,17 +56,17 @@ def normalize_keyword_aggregation(kwargs: dict) -> Tuple[dict, List[str], List[i

Returns
-------
aggspec : dict
aggspec : DefaultDict[list]
Copy link
Member

Choose a reason for hiding this comment

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

What's the reason to use type annotations syntax instead of the docs one we've been using?

Copy link
Member Author

Choose a reason for hiding this comment

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

What's the reason to use type annotations syntax instead of the docs one we've been using?

I'll change that, forgot that we use a different syntax for the docs

@ShaharNaveh
Copy link
Member Author

Probably better to split the changes to the examples from the changes to the typing. I guess they're unrelated.

@datapythonista by "split" you mean, separate PRs?

@simonjayhawkins simonjayhawkins added this to the 1.1 milestone Apr 7, 2020
@datapythonista
Copy link
Member

Yes, I mean separate PRs

@ShaharNaveh ShaharNaveh mentioned this pull request Apr 7, 2020
5 tasks
@simonjayhawkins
Copy link
Member

Probably better to split the changes to the examples from the changes to the typing. I guess they're unrelated.

IMO they are related. see #33263 (comment)

Copy link
Member

@datapythonista datapythonista left a comment

Choose a reason for hiding this comment

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

Didn't see that comment @simonjayhawkins, sorry I missed the context @MomIsBestFriend. I guess you opened a separate PR for the types. In any case, lgtm, thanks!

@simonjayhawkins simonjayhawkins merged commit 77b03bd into pandas-dev:master Apr 7, 2020
@simonjayhawkins
Copy link
Member

Thanks @MomIsBestFriend

@ShaharNaveh ShaharNaveh deleted the DOC-DocTests-core-aggregation branch April 7, 2020 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants