-
-
Notifications
You must be signed in to change notification settings - Fork 18k
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
DEPR: Styler.set_na_rep
and .set_precision
in favour of .format(na_rep='x', precision=3)
#40134
Conversation
# Conflicts: # pandas/io/formats/style.py
# Conflicts: # pandas/io/formats/style.py
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.
small comment, ping on greenish
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.
Didn't review the code, but conceptually looks good! And a few doc comments
Co-authored-by: Joris Van den Bossche <jorisvandenbossche@gmail.com>
Co-authored-by: Joris Van den Bossche <jorisvandenbossche@gmail.com>
Co-authored-by: Joris Van den Bossche <jorisvandenbossche@gmail.com>
@jreback ping this is greenish, if you approve the changes to the docstring |
thanks @attack68 very nice! |
@attack68 want to make a PR enforcing this deprecation? |
yes will do. been waiting for the 2.0 tag to push to |
na_rep
arg overwrites existing when not given. #40032 and PR BUG/ENH:Styler.format()
always inherits from.set_na_rep()
#40060Styler.set_na_rep()
andStyler.set_precision()
in favour of, and incorporatingprecision
intoStyler.format()
. Maintains some backwards compatibility with a deprecation warning, the copy mechanics remain broken.Styler.set_na_rep('MISS')
is replaced and equivalent toStyler.format(na_rep='MISS')
Styler.set_precision(5)
is replaced and equivalent toStyler.format(precision=5)
Styler.set_na_rep('MISS').set_precision(5)
is equivalent toStyler.format(na_rep='MISS', precision=5)
Styler.set_precision(5).set_na_rep('MISS')
is equivalent toStyler.format(na_rep='MISS', precision=5)
default_formatter
andmaybe_wrap_formatter
methods tomodule
level.This PR was suggested after review of #40060 as an alternative. It seems to be a simpler and more consistent solution for API.