-
-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
ENH: Styler.highlight_quantile
method
#40926
Conversation
attack68
commented
Apr 13, 2021
•
edited
Loading
edited
# Conflicts: # pandas/io/formats/style.py
Styler.highlight_quantile
methodStyler.highlight_quantile
method
pandas/io/formats/style.py
Outdated
axis, axis_apply = 1, 0 | ||
else: | ||
axis, axis_apply = None, None | ||
q = np.nanquantile( |
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.
is there a reason you are not using Series.quantile? (which does handle timetamp and other types).
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.
previously I was using qcut
which was criticised, probably for good reason, so I switched to NumPy, to be honest didn't see these when searching.
However, numpy allows axis=None
, whereas to achieve the same result here I will need to ravel a DataFrame to a Series and apply the calculation. Still, I will give it a try.
thanks @attack68 |