Skip to content

ENH: Add option to highlight NaN cells #5330

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
wants to merge 1 commit into from

Conversation

sburns
Copy link

@sburns sburns commented Oct 25, 2013

Useful for quickly inspecting data in an ipynb

  • Add display.highlight_nan option (default True)
  • Add argument to DataFrame.to_html
    and HTMLFormatter.init
  • Add test

Useful for quickly inspecting data in an ipynb

- Add display.highlight_nan option (default True)
- Add argument to DataFrame.to_html
  and HTMLFormatter.__init__
- Add test
@ghost
Copy link

ghost commented Nov 21, 2013

Thanks for the PR, but this solution is too specific. The actual feature needed is
conditional formatting and it needs to be solved in a more general way, one
which will support this as a private case.

closing.

related #3190

@hmeine
Copy link

hmeine commented Jun 4, 2014

This is nearly exactly what I have in mind. (I would like to de-emphasize NaN cells.)

My idea was to add a class to empty cells:

<td class="pandas-nan">

Then, one can use CSS for arbitrary styling. (No, even CSS3 does not have selectors yet based on content which would allow to select NaN-cells.)

Since CSS allows many other types of conditional formatting already, I would say that this is a useful addition that does not interfere with other enhancement ideas (templates, ...)?!

@sburns
Copy link
Author

sburns commented Jun 4, 2014

I like you're solution much better @hmeine but it's for @y-p to decide.

@cpcloud
Copy link
Member

cpcloud commented Jun 4, 2014

@hmeine @sburns We might be waiting quite a while for @y-p to decide since he's stepped out of pandas dev. I think may be too specific. We don't really want to add anymore arguments to to_html, though I understand the need to be able to customize HTML output. If one of you wants to take the lead on #3190, that would be most welcome.

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants