Skip to content

Commit 81682d0

Browse files
author
Thomas Lautenschlaeger
committed
completeted doc
1 parent 9e0e55a commit 81682d0

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

doc/source/whatsnew/v1.5.2.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Fixed regressions
2727
Bug fixes
2828
~~~~~~~~~
2929
- Bug in the Copy-on-Write implementation losing track of views in certain chained indexing cases (:issue:`48996`)
30-
-
30+
- Bug in inconsistent DataFrame.agg behavior when passing as kwargs ``numeric_only=True`` (:issue:`49352`
3131

3232
.. ---------------------------------------------------------------------------
3333
.. _whatsnew_152.other:

pandas/core/frame.py

+3
Original file line numberDiff line numberDiff line change
@@ -9322,6 +9322,9 @@ def apply(
93229322
Functions that mutate the passed object can produce unexpected
93239323
behavior or errors and are not supported. See :ref:`gotchas.udf-mutation`
93249324
for more details.
9325+
Use the keyword argument `numeric_only=True` to apply functions
9326+
only to numeric columns and to skip the non-numeric columns.
9327+
e.g. the column contains a string.
93259328
93269329
Examples
93279330
--------

pandas/core/shared_docs.py

+4
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@
4646
for more details.
4747
4848
A passed user-defined-function will be passed a Series for evaluation.
49+
50+
Use the keyword argument `numeric_only=True` to apply functions
51+
only to numeric columns and to skip the non-numeric columns.
52+
e.g. the column contains a string.
4953
{examples}"""
5054

5155
_shared_docs[

0 commit comments

Comments
 (0)