ENH: Styler display of NaN / null Values #21527
Labels
IO HTML
read_html, to_html, Styler.apply, Styler.applymap
Output-Formatting
__repr__ of pandas objects, to_string
Visualization
plotting
The
Styler
allows for null cells to be highlighted using.style.highlight_null()
but anan
text string will also be displayed.If a column is coloured using
.background_gradient()
it must be a numeric type otherwise numerical comparisons fail. This means that using a construction of the form..fillna('')
on the column will create an error as the column is cast to anobject
type.nan
values can be removed in the rendered table using a hack of the form.render().replace('nan','')
but it would be cleaner to use something along the lines of.style.replace_null(value)
that could be used to tidy up the display ofnan
cells.The text was updated successfully, but these errors were encountered: