How to plot frequency table with total row and column as heatmap?

I’m trying to plot pandas crosstab dataframe as heatmp without success. I want to keep the margins of the table (total row and column) but to exclude them from the color scale of the heatmap (fill them with predefined color, gray for example).
Can I achieve this behavior with heatmap?


Hi @nimrod welcome to the community.

Could you add some more information? What do you mean by margins? Maybe this gives you some ideas: