I have the data frame h3_Ho_Hm which looks like this with hour as index.
KE EH LA PR
Hour
15 0.01052 0.010545 0.010325 0.013201
30 0.01052 0.010545 0.010325 0.013201
45 0.01052 0.010545 0.010932 0.013201
100 0.01052 0.010545 0.010932 0.009901
115 0.01052 0.010545 0.010932 0.013201
------------------------------------------------
2245 0.01021 0.010252 0.010325 0.006601
2300 0.01021 0.010252 0.010021 0.009901
2315 0.01021 0.010252 0.010325 0.009901
2330 0.01021 0.010252 0.009718 0.009901
2345 0.01021 0.010252 0.010325 NaN
I want to create a heatmap which shows the columns on the y-axis and the hour column on the x-axis. I tried to use the code from this post which I implemented as so
Index = temp1[0] (a column with the hours)
Cols = ["KE", "EH", "LA", "PR"]
h3_heatmap = DataFrame(data = h3_Ho_Hm, index = Index, columns = Cols)
sns.heatmap(h3_heatmap)
Which give me this result
When I use the code below I get a nice result but still with the wrong axis order
sns.heatmap(h3_Ho_Hm)
Any idea on how I can swap the axis so that the KE, EH, LA and PR are on the y-axis and the hours on the x-axis?