dexplo/dataframe_image

df.style.background_gradient() changes display of float value

yazhinia opened this issue · 1 comments

Hi,
Thanks for creating a useful package. I wanted to save a table content as an image. The table contains float values for example 0.2 which changes to 0.200000 upon using style.background_gradient(). This is not technically wrong but for visual image, the simple form of 0.2 looks better. Any effort on this aspect is much appreciated.

Thank you.

Please review your dataframe in notebook. It should have 0.200000 in notebook display.

image

If you want less 0, you could try:

image

Or other methods to modify pandas styler.