I would like to plot a pie chart from my pandas data Frame of customer buying behaviours
PREMIUM_CUSTOMER | TOT_SALES |
---|---|
Mainstream | 750744.50 |
Budget | 676211.55 |
Premium | 507458.95 |
This is my code so far
plt.style.use("fivethirtyeight")
labels = ['Mainstream','Budget','Premium']
df_customer.plt.pie("PREMIUM_CUSTOMER","TOT_SALES",labels=labels,wedgeprops={'edgecolor':'black'}, shadow = True,startangle =90, autopct='%1.11f%%')
plt.title("Percentage of sales to customer types ")
plt.tight_layout()
plt.show()