-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
ENH: #3335 Pivot table support for setting name of margins column. #11581
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
jreback
merged 1 commit into
pandas-dev:master
from
lexual:issue_3335_pivot_handle_all_for_margins
Nov 15, 2015
Merged
ENH: #3335 Pivot table support for setting name of margins column. #11581
jreback
merged 1 commit into
pandas-dev:master
from
lexual:issue_3335_pivot_handle_all_for_margins
Nov 15, 2015
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
exception_message = 'Conflicting name for margins' | ||
for level in table.index.names: | ||
if margins_name in table.index.get_level_values(level): | ||
raise ValueError(exception_message) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use the margins_name
itself in the error message
pls also add a whatsnew note (API changes) |
c56d00f
to
ac97c7e
Compare
done |
you have to do |
…column. ref pandas-dev#3335. Adds margin_name parameter to pivot_table so that user can set it to something other than 'All'. Raises ValueError exception if there is a conflict between the value of margin_column and one of the other values appearing in the indices of the pivot table.
ac97c7e
to
1ca006c
Compare
.format() change made, waiting on Travis. |
Travis tests green ;) |
jreback
added a commit
that referenced
this pull request
Nov 15, 2015
…_margins ENH: #3335 Pivot table support for setting name of margins column.
thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
closes #3335.
Adds margin_column parameter to pivot_table so that user can set it to
something other than 'All'.
Raises ValueError exception if there is a conflict between the value of
margin_column and one of the other values appearing in the indices of
the pivot table.
take into account notes from closed pull request: #10296