text_plain_output_1.png
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

track_csv = pd.read_table('/kaggle/input/-spotify-tracks-dataset/dataset.csv', sep=',')
track_csv = track_csv.rename(columns={'duration_ms': 'duration'})
track_csv['duration'] = track_csv['duration'] / 60000

popularityByGenre = track_csv.groupby([track_csv['track_genre']])['popularity'].mean().sort_values(ascending=False)
popularityByGenre.head(20)