Here\'s my code:
x_pie_data = x_df.groupby(\'Trend\') pie_label = sorted([i for i in x_df.loc[:, "Trend"].unique()]) plt.pie(x_pie_data[\'Trend\'].count