-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
ENH: add kwargs rename
to Styler.format_index
for overwriting index labels
#45288
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
Closed
Closed
Changes from 33 commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
b3c55af
setup new kwarg
attack68 c68944a
method and raise on error
attack68 929df89
Merge remote-tracking branch 'upstream/master' into styler_format_ali…
attack68 fcac539
add basic tests
attack68 55010b5
add basic tests
attack68 9500c06
extend docs
attack68 38ea09c
mypy fix
attack68 86287a4
Merge remote-tracking branch 'upstream/master' into styler_format_ali…
attack68 f48b43c
whats new
attack68 9bcc320
doctest skip
attack68 526cc31
Merge remote-tracking branch 'upstream/main' into styler_format_alias…
attack68 a6952bb
doc string fixes
attack68 2a18d60
Merge remote-tracking branch 'upstream/main' into styler_format_alias…
attack68 150ee1d
Merge remote-tracking branch 'upstream/main' into styler_format_alias…
attack68 0c4bc3d
Merge remote-tracking branch 'upstream/main' into styler_format_alias…
attack68 06c68d2
Merge remote-tracking branch 'upstream/main' into styler_format_alias…
attack68 53cc5e2
Merge remote-tracking branch 'upstream/main' into styler_format_alias…
attack68 6820423
Merge remote-tracking branch 'upstream/main' into styler_format_alias…
attack68 48b2202
refactor
attack68 85b7f6d
whats new update
attack68 bd1aa9a
Merge remote-tracking branch 'upstream/main' into styler_format_alias…
attack68 599c4b5
Merge remote-tracking branch 'upstream/main' into styler_format_alias…
attack68 a459fa3
Merge remote-tracking branch 'upstream/main' into styler_format_alias…
attack68 e6ef392
Merge remote-tracking branch 'upstream/main' into styler_format_alias…
attack68 db82122
Merge remote-tracking branch 'upstream/main' into styler_format_alias…
attack68 bf13d8e
Merge remote-tracking branch 'upstream/main' into styler_format_alias…
attack68 695df51
Merge branch 'main' into styler_format_alias_multi
attack68 ece8b10
change arg `alias` to `rename`
attack68 33d89b5
change arg `alias` to `rename`
attack68 6eabbc3
change arg `alias` to `rename`
attack68 92c114e
Merge remote-tracking branch 'upstream/main' into styler_format_alias…
attack68 f38c315
Merge remote-tracking branch 'upstream/main' into styler_format_alias…
attack68 cfdd639
Merge remote-tracking branch 'upstream/main' into styler_format_alias…
attack68 76fc4ee
Merge remote-tracking branch 'upstream/main' into styler_format_alias…
attack68 6b93ff8
Merge remote-tracking branch 'upstream/main' into styler_format_alias…
attack68 2b2406c
Merge remote-tracking branch 'upstream/main' into styler_format_alias…
attack68 c48e659
Merge remote-tracking branch 'upstream/main' into styler_format_alias…
attack68 3439c50
Merge remote-tracking branch 'upstream/main' into styler_format_alias…
attack68 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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.
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.
umm the user can simply
.rename_axis
on the frame no? why adding api here that is duplicativeThere 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.
my design objective with styler has been to customise the display of tables without altering the underlying dataframe object (which is of course possible to get around many of the styler functions).
you can lose the power of indexing if you relabel for the purpose of printout.
additionally, methods like
DataFrame.to_html
andDataFrame.to_latex
use aheaders
argument which does this relabelling. So in order to replicate that behaviour with the styler code need this pr.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.
here's a good example:
