Untitled
3 years ago in Plain Text
import pandas as pd
df = pd.read_csv('music_log_upd.csv')
pop_music = df[(df['genre_name'] == 'pop')&(df['total_play_seconds'] != 0)]
pop_music_max_total_play = pop_music['total_play_seconds'].max()
pop_music_max_info = pop_music.loc[pop_music['total_play_seconds'] == pop_music['total_play_seconds'].max()]
print(pop_music_max_info)