Skip to content

Commit 3fcf43a

Browse files
9th update for issue 3439
1 parent c348d54 commit 3fcf43a

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

pandas/core/reshape/pivot.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,13 @@ def pivot_table(data, values=None, index=None, columns=None, aggfunc='mean',
7373
>>> table = pivot_table(df, values='D', index=['A', 'B'],
7474
... columns=['C'], aggfunc=np.sum)
7575
>>> table
76-
small large
77-
foo one 1 4
78-
two 6 NaN
79-
bar one 5 4
80-
two 6 7
76+
... # doctest: +NORMALIZE_WHITESPACE
77+
C large small
78+
A B
79+
bar one 4.0 5.0
80+
two 7.0 6.0
81+
foo one 4.0 1.0
82+
two NaN 6.0
8183
8284
Returns
8385
-------

0 commit comments

Comments
 (0)