I am using the code below to generate a heatmap on a table, but for some reason float numbers are getting additional decimal places. For example, 80.4 is becoming 80.400000 which kinda ruins the visualization. Is there any way to stop this? The numbers are normal in the df itself: rounded to 1 decimal place, as I need them to be.
df.style.background_gradient(cmap ='RdYlGn').set_properties(**{'font-size': '15px'})
One way I found to fix it is to turn float into int, but the decimal places are important here. I also have a "Average Rating" column ranging from ~5 to 10 and 2 decimal places, so int is not an option.