-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
ENH: add decimal
and thousands
args to Styler.format()
#40596
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 23 commits into
pandas-dev:master
from
attack68:format_decimal_thousands
Apr 20, 2021
Merged
Changes from 14 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
a82f4f5
update escaping for html
attack68 51bda2c
update escaping for html
attack68 a323f93
tests for format_escape
attack68 64a54d3
Merge remote-tracking branch 'upstream/master' into escape_html_forma…
attack68 e01eeb5
check and docs fix
attack68 2348165
versionadded and whatsnew
attack68 27f39eb
only use escape on str
attack68 c1b29c3
refactor
attack68 0008af2
add decimal and thousands options to format function
attack68 02ba51e
add decimal and thousands options to format function
attack68 b07de09
docs
attack68 8ea4e0a
Merge remote-tracking branch 'upstream/master' into format_decimal_th…
attack68 2202a7c
tests with parameters
attack68 45dd2f1
var names
attack68 fb5dc2f
Merge remote-tracking branch 'upstream/master' into format_decimal_th…
attack68 863dd6c
move format tests
attack68 131b928
Merge remote-tracking branch 'upstream/master' into format_decimal_th…
attack68 b82e0b1
Merge remote-tracking branch 'upstream/master' into format_decimal_th…
attack68 a0b7fd6
restructure formatter wrappers
attack68 c35b1ee
Merge remote-tracking branch 'upstream/master' into format_decimal_th…
attack68 70f1e2b
Merge remote-tracking branch 'upstream/master' into format_decimal_th…
attack68 d834f8f
Merge remote-tracking branch 'upstream/master' into format_decimal_th…
attack68 19d862b
Merge remote-tracking branch 'upstream/master' into format_decimal_th…
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
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.
can we share code with FloatArrayFormatter in pandas/io/format.py ?
may need to refactor to do that.
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.
taking a quick look:
thousands
, justdecimal
replacement in that code.Styler
doesdisplay_funcs
element-wise (which it can't avoid for processing individual cell styles). I guess this makes it very difficult to refactor across module (unless the fomat_class was called element-wise)escape
andsubset
would have to be wrapped around the format.py code, so it might end up equally complicated anyway?will have a think over next day.
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.
@jreback I think the refactor is too complicated at this stage since:
thousands
argument which is main part of this PR.styler
subset
argument)