Skip to content

Commit f69a28e

Browse files
8th update for issue 3439
1 parent 0f23760 commit f69a28e

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

pandas/core/reshape/pivot.py

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,16 +58,17 @@ def pivot_table(data, values=None, index=None, columns=None, aggfunc='mean',
5858
... "small", "large", "small", "small",
5959
... "large"],
6060
... "D": [1, 2, 2, 3, 3, 4, 5, 6, 7]})
61-
A B C D
62-
0 foo one small 1
63-
1 foo one large 2
64-
2 foo one large 2
65-
3 foo two small 3
66-
4 foo two small 3
67-
5 bar one large 4
68-
6 bar one small 5
69-
7 bar two small 6
70-
8 bar two large 7
61+
>>> df
62+
A B C D
63+
0 foo one small 1
64+
1 foo one large 2
65+
2 foo one large 2
66+
3 foo two small 3
67+
4 foo two small 3
68+
5 bar one large 4
69+
6 bar one small 5
70+
7 bar two small 6
71+
8 bar two large 7
7172
7273
>>> table = pivot_table(df, values='D', index=['A', 'B'],
7374
... columns=['C'], aggfunc=np.sum)

0 commit comments

Comments
 (0)