I want to plot multiple chart aligned vertically from a dataframe which is like the following one.
DPT名 曜日 売上金額
0 first Friday 208.431304
1 first Monday 213.055683
2 first Saturday 217.547426
3 first Sunday 211.330424
4 first Thursday 209.094095
.. ... ... ...
However with the following code:
fig, ax = plt.subplots(2,1, figsize=(20, 20), tight_layout=True)
sales[sales['曜日'].isin(['Monday'])].plot(x='DPT名', y='売上金額', ax=ax[0,0], kind='bar')
sales[sales['曜日'].isin(['Tuesday'])].plot(x='DPT名', y='売上金額', ax=ax[1,0], kind='bar')
I had the following error:
too many indices for array: array is 1-dimensional, but 2 were indexed