We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Followup to #26399
In [1]: df = pd.DataFrame({'A': [1, 1, 1, 2, 2], ...: 'B': range(5), ...: 'C': range(5)}) In [2]: df Out[2]: A B C 0 1 0 0 1 1 1 1 2 1 2 2 3 2 3 3 4 2 4 4 In [3]: df.groupby('A').B.agg(foo='count') Out[3]: foo A 1 3 2 2
#26399 (review)
The text was updated successfully, but these errors were encountered:
ENH: Named aggregation in SeriesGroupBy.agg
9d87c82
```python In [4]: animals = pd.DataFrame({'kind': ['cat', 'dog', 'cat', 'dog'], ...: 'height': [9.1, 6.0, 9.5, 34.0], ...: 'weight': [7.9, 7.5, 9.9, 198.0]}) ...: animals.groupby("kind").height.agg(max_height='max') Out[4]: max_height kind cat 9.5 dog 34.0 ``` Closes pandas-dev#26512
c008426
Successfully merging a pull request may close this issue.
Followup to #26399
#26399 (review)
The text was updated successfully, but these errors were encountered: