Skip to content

Revised the doc-string for _app_template to bring in line with curren… #48613

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

15 changes: 10 additions & 5 deletions pandas/core/groupby/groupby.py
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ class providing the base-class of operations.

Parameters
----------
func : function, str, list or dict
func : function, str, list, dict or None
Function to use for aggregating the data. If a function, must either
work when passed a {klass} or when passed to {klass}.apply.

Expand All @@ -529,6 +529,9 @@ class providing the base-class of operations.
- string function name
- list of functions and/or function names, e.g. ``[np.sum, 'mean']``
- dict of axis labels -> functions, function names or list of such.
- None, in which case output is determined from ``**kwargs`` using Named Aggregation. In this scenario the output
has one column for each element in ``**kwargs``. The name of the column is a string of the keyword's variable name. The
Copy link
Member

Choose a reason for hiding this comment

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

I think from the Ci checks that the line lengths here are too long: https://github.com/pandas-dev/pandas/actions/runs/3102809189/jobs/5025470354

keyword's value determines the aggregation used to compute the values in the column.

Can also accept a Numba JIT function with
``engine='numba'`` specified. Only passing a single function is supported
Expand Down Expand Up @@ -559,7 +562,9 @@ class providing the base-class of operations.

.. versionadded:: 1.1.0
**kwargs
Keyword arguments to be passed into func.
* If ``func`` is None, ``**kwargs`` are used to define the output names and aggregations via Named Aggregation. See
``func`` entry.
* Otherwise, keyword arguments to be passed into func.

Returns
-------
Expand All @@ -569,10 +574,10 @@ class providing the base-class of operations.
--------
{klass}.groupby.apply : Apply function func group-wise
and combine the results together.
{klass}.groupby.transform : Aggregate using one or more
operations over the specified axis.
{klass}.aggregate : Transforms the Series on each group
{klass}.groupby.transform : Transforms the Series on each group
based on the given function.
{klass}.aggregate : Aggregate using one or more
operations over the specified axis.

Notes
-----
Expand Down