I am trying to run a heatmap for a dataset, but the values of the x-axis are mess up. They are not in order. Below are my code and a picture of my graph.
MonthDay = calls.groupby(by=['Month','Day of Week']).count()['Reason'].unstack()
plt.figure(figsize = (12,6))
plt.title("Case Count by Month and Day", fontsize =20)
plt.xlabel('Day of Week',fontsize=16)
plt.ylabel('Month', fontsize=16)
sns.heatmap(MonthDay,cmap ='rocket_r')
Can someone also please explain why dmap is not working for the heatmap. Thanks!