I am trying to print all pie charts for different types of attack labels but its only printing one?

16 Views Asked by At
attacks=list(data.labels.unique())
for labe in attacks:
    print(labe)
    data.loc[data.labels=='normal']['protocol_type'].value_counts().plot(kind='pie', label=str(labe)+' protcol type proportions', autopct='%.2f%%')

enter image description here

I am trying to print all pie charts for different types of attack labels, but it's only printing one. How do I print all charts using loops?

0

There are 0 best solutions below