-
-
Notifications
You must be signed in to change notification settings - Fork 18.6k
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
DOC: Fixed examples in pandas/core/aggregation.py
#33263
Conversation
>>> 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])) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@simonjayhawkins Fixed it in eceb678
There was a problem hiding this 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.
pandas/core/aggregation.py
Outdated
@@ -52,17 +56,17 @@ def normalize_keyword_aggregation(kwargs: dict) -> Tuple[dict, List[str], List[i | |||
|
|||
Returns | |||
------- | |||
aggspec : dict | |||
aggspec : DefaultDict[list] |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
@datapythonista by "split" you mean, separate PRs? |
Yes, I mean separate PRs |
IMO they are related. see #33263 (comment) |
There was a problem hiding this 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!
Thanks @MomIsBestFriend |
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff