Generation

generate functionTue, 21 Feb 2023

There is a Pandas dataframe: Type App 0 Paid 757 1 Free 8902 Construct a pie chart with these values in percent

df_type['App'].groupby(df_type['Type']).sum().plot(kind='pie', figsize=(5, 6), autopct='%1.1f%%', # add in percentages startangle=90, # start angle 90° (Africa) shadow=True, # add shadow ) plt.title('Pie chart of the Repartition between Free and Paid Apps') plt.axis('equal') # Sets the pie chart to look like a circle. plt.show()

Questions about programming?Chat with your personal AI assistant