1

I plotted the pie chart using the (.plot) function. The pie shows no label, I tried giving labels through the labels parameter but the same blank pie is plotted. How do I add labels to the pie? Code-

count=[6943,933,417,337]
xlab=['Everyone', 'Teen', 'Adult', 'Old']

dic={"count":count,
    "label":xlab}
df=pd.DataFrame(dic)

plt.pie(df["count"],labels=df["label"])
plt.show()

Pie chart with no labels

0 Answers0