8000 DOC: Enhancing pivot / reshape docs by VincentLa · Pull Request #21038 · pandas-dev/pandas · GitHub
[go: up one dir, main page]

Skip to content

DOC: Enhancing pivot / reshape docs #21038

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Nov 12, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Deleting a duplicate example in pd.DataFrame.pivot_table documentation
  • Loading branch information
VincentLa14 committed May 14, 2018
commit 783f5f0de6ae2ea6a8d8ac1d05b72ad1de4fc948
10 changes: 1 addition & 9 deletions pandas/core/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -5246,15 +5246,7 @@ def pivot(self, index=None, columns=None, values=None):
7 bar two small 6
8 bar two large 7

>>> table = pivot_table(df, values='D', index=['A', 'B'],
... columns=['C'], aggfunc=np.sum)
>>> table
C large small
A B
bar one 4.0 5.0
two 7.0 6.0
foo one 4.0 1.0
two NaN 6.0
This first example aggregates values by taking the sum.

>>> table = pivot_table(df, values='D', index=['A', 'B'],
... columns=['C'], aggfunc=np.sum)
Expand Down
0