-
-
Save amankharwal/43b8c87f281015d4d27b426713e6efd1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ratings = data["Score"].value_counts() | |
numbers = ratings.index | |
quantity = ratings.values | |
custom_colors = ["skyblue", "yellowgreen", 'tomato', "blue", "red"] | |
plt.figure(figsize=(10, 8)) | |
plt.pie(quantity, labels=numbers, colors=custom_colors) | |
central_circle = plt.Circle((0, 0), 0.5, color='white') | |
fig = plt.gcf() | |
fig.gca().add_artist(central_circle) | |
plt.rc('font', size=12) | |
plt.title("Distribution of Amazon Product Ratings", fontsize=20) | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment