Skip to content
Closed
Changes from all commits
Commits
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
6 changes: 5 additions & 1 deletion doc/source/groupby.rst
Original file line number Diff line number Diff line change
Expand Up @@ -941,11 +941,15 @@ that is itself a series, and possibly upcast the result to a DataFrame:

.. warning::

In the current implementation apply calls func twice on the
* In the current implementation ``apply`` calls func twice on the
first group to decide whether it can take a fast or slow code
path. This can lead to unexpected behavior if func has
side-effects, as they will take effect twice for the first
group.

* For predictable results and performance, func should **not** mutate
any of the group chunks. Group chunks should be treated as immutable
since changes to a group chunk may produce unexpected results.

.. ipython:: python

Expand Down