Skip to content
Prev Previous commit
Next Next commit
whatsnew
  • Loading branch information
rhshadrach committed Mar 3, 2022
commit cf8e4565a95bb0f0955c4ab2028f334c35491803
15 changes: 15 additions & 0 deletions doc/source/whatsnew/v1.5.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -82,17 +82,32 @@ did not have the same index as the input.

.. code-block:: ipython

In [3]: df.groupby('a', dropna=True).transform(lambda x: x.sum())
Out[3]:
b
0 5
1 5

In [3]: df.groupby('a', dropna=True).transform(lambda x: x)
Out[3]:
b
0 2
1 3

In [3]: df.groupby('a', dropna=True).transform('sum')
Out[3]:
b
0 5
1 5
2 5

*New behavior*:

.. ipython:: python

df.groupby('a', dropna=True).transform(lambda x: x.sum())
df.groupby('a', dropna=True).transform(lambda x: x)
df.groupby('a', dropna=True).transform('sum')

.. _whatsnew_150.notable_bug_fixes.notable_bug_fix2:

Expand Down