Skip to content

Commit f32d0c6

Browse files
author
Thomas Lautenschlaeger
committed
adapted doc
1 parent ea68736 commit f32d0c6

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-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

+2
Original file line numberDiff line numberDiff line change
@@ -9322,6 +9322,8 @@ 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 only to
9326+
numeric columns and to skip the non-numeric columns.
93259327
93269328
Examples
93279329
--------

pandas/core/shared_docs.py

+3
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@
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 only to
51+
numeric columns and to skip the non-numeric columns.
4952
{examples}"""
5053

5154
_shared_docs[

0 commit comments

Comments
 (0)