-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
ENH: Styler.text_gradient
: easy extension alternative to .background_gradient
#41098
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
Conversation
# Conflicts: # pandas/io/formats/style.py
Styler.text_gradient
: easy extension alternative to .background_gradient
pandas/io/formats/style.py
Outdated
Parameters | ||
---------- | ||
cmap : str or colormap | ||
Matplotlib colormap. |
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.
these match the kwargs for background_gradient? if not why not
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 you use a shared doc-string?
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.
yes they all match its the same signature. Can you use a shared doc string even if the short summary/ extended summary part, and the examples are different? I've never used a shared doc string.. any tips where one is used that I can lookup and copy?
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.
nevermind.. i figured it out and made the changes.
# Conflicts: # pandas/io/formats/style.py
lgtm. can you rebase one more time and ping on green. also pls update the styler docs as a followon. |
@jreback pinging green now. |
Thanks @attack68 |
This is minor code alteration to the
_background_gradient
function that permits a text-only coloring version, i.e.Styler.text_gradient
.This could alternatively be performed with a
text_only=True
keyword addition toStyler.background_gradient
existing method, but it seemed dissimilar enough to merit its own method (and avoid adding more kwargs).