I would like to show the numbers as percentage of Row (or Column) Total for this heatmap. I am using Plotly library for the plotting.
I could find a way to get the percentage of row total using code below. I would really appreciate any help to plot these percentages in a heatmap for better visualisation.
You can use px.imshow() to create a heatmap for your dataframe such that:
import plotly.express as px
fig = px.imshow(pivotdf_unstack, text_auto=True, aspect="auto")
fig.show()
You can replace the null values with any suitable values you think. You will get a heatmap with null values like: