1
0
Fork 0

Add: "Genre Distribution" to music stats

This commit is contained in:
Aroy-Art 2024-09-23 21:48:42 +02:00
parent 8014d3a034
commit b881d0957c
Signed by: Aroy
GPG key ID: DB9689E9391DD156

View file

@ -56,3 +56,11 @@ plt.title('Top 10 Most Frequent Artists')
plt.xlabel('Number of Tracks') plt.xlabel('Number of Tracks')
plt.show() plt.show()
genre_counts = df['genre'].value_counts()
plt.figure(figsize=(10, 6))
genre_counts.plot.pie(autopct='%1.1f%%')
plt.title('Genre Distribution')
plt.ylabel('')
plt.show()