pivot_table
df = pd.pivot_table(df2021,
index = '월',
columns = '품종',
values = '물량(kg)',
aggfunc = 'sum')
stack bar plot
df.plot(kind="bar",stacked=True,figsize=(13,7),color=colors) # stacked
plt.ticklabel_format(style='plain', axis='y',useOffset=False)
plt.legend(bbox_to_anchor = (1, 1), title = '품종')
plt.title('월별 품종 거래량', fontsize=14)
plt.show()