Add: "Genre Distribution" to music stats
This commit is contained in:
parent
8014d3a034
commit
b881d0957c
1 changed files with 8 additions and 0 deletions
|
@ -56,3 +56,11 @@ plt.title('Top 10 Most Frequent Artists')
|
|||
plt.xlabel('Number of Tracks')
|
||||
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()
|
||||
|
||||
|
|
Loading…
Reference in a new issue