I have a Pandas dataframe that looks like this:
store_id days times rating
100 monday '1:00pm - 3:00pm' 0
100 monday '3:00pm - 6:00pm' 1
100 monday '6:00pm - 9:00pm' 2
...
store n
Where there are ~60 stores and the ratings range from 0 - 2. I would like to create a 6x5 grid Seaborn of heatmaps, with one heatmap per store. I would like for the x-axis to be the days and for the y-axis to be the times.
I tried this:
f, axes = plt.subplots(5,6)
i=0
for store in df['store_id']:
sns.heatmap(data=df[df['store_id']==store]['rating'], ax=axes[i])
i+=1
This creates the 5x6 grid, but generates an error ('Inconsistent shape between the condition and the input...'). What's the best way to do this?