8000 DOC: fix flake8 issue in groupby.rst by LJArendse · Pull Request #24363 · pandas-dev/pandas · GitHub
[go: up one dir, main page]

Skip to content

DOC: fix flake8 issue in groupby.rst #24363

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
Changes from 1 commit
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
DOC: Fix doc/source/groupby.rst:1306:42: F821 undefined name 'report_…
…func' (#24178)
  • Loading branch information
LJArendse committed Dec 13, 2018
commit 9209528746c2e0379b237badba777cdc7f6fe6ca
10 changes: 7 additions & 3 deletions doc/source/groupby.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1301,11 +1301,15 @@ Piping can also be expressive when you want to deliver a grouped object to some
arbitrary function, for example:

.. code-block:: python
def mean(groupby):
return(groupby.mean())

df.groupby(['Store', 'Product']).pipe(report_func)
df.groupby(['Store', 'Product']).pipe(mean)

where ``report_func`` takes a GroupBy object and creates a report
from that.
where ``mean`` takes a GroupBy object and finds the mean of the Revenue and Quantity
columns repectively for each Store-Product combination. The ``mean`` function can
be any function that takes in a GroupBy object; the ``.pipe`` will pass the GroupBy
object as a parameter into the function you specify.

Examples
--------
Expand Down
0