Skip to content

Commit 2fd8021

Browse files
authored
DOC: complement the documentation for pandas.DataFrame.agg #35912 (#35941)
* DOC: complement the documentation for pandas.DataFrame.agg * DOC: complement the documentation for pandas.DataFrame.agg reformat the documentation according to PEP 8 * DOC: complement the documentation for pandas.DataFrame.agg reformat the documentation according to PEP 8
1 parent 8f33d73 commit 2fd8021

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

pandas/core/frame.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7380,6 +7380,15 @@ def _gotitem(
73807380
min 1.0 2.0
73817381
sum 12.0 NaN
73827382
7383+
Aggregate different functions over the columns and rename the index of the resulting
7384+
DataFrame.
7385+
7386+
>>> df.agg(x=('A', max), y=('B', 'min'), z=('C', np.mean))
7387+
A B C
7388+
x 7.0 NaN NaN
7389+
y NaN 2.0 NaN
7390+
z NaN NaN 6.0
7391+
73837392
Aggregate over the columns.
73847393
73857394
>>> df.agg("mean", axis="columns")

0 commit comments

Comments
 (0)