Skip to content

API: Add Styler.where #16255

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
TomAugspurger opened this issue May 5, 2017 · 0 comments · Fixed by #17474
Closed

API: Add Styler.where #16255

TomAugspurger opened this issue May 5, 2017 · 0 comments · Fixed by #17474
Labels
IO HTML read_html, to_html, Styler.apply, Styler.applymap
Milestone

Comments

@TomAugspurger
Copy link
Contributor

Code Sample, a copy-pastable example if possible

# Instead of 
df.style.applymap(lambda val: 'color: %s' % 'red' if val < 0 else 'black')

It would be

df.style.where(lambda val: val < 0, 'color: red', 'color: black')
@TomAugspurger TomAugspurger added the IO HTML read_html, to_html, Styler.apply, Styler.applymap label May 5, 2017
@TomAugspurger TomAugspurger added this to the 0.20.2 milestone May 5, 2017
@jorisvandenbossche jorisvandenbossche modified the milestones: 0.21.0, 0.20.2 May 19, 2017
@Licht-T Licht-T mentioned this issue Sep 8, 2017
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IO HTML read_html, to_html, Styler.apply, Styler.applymap
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants