Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pandas as pd
- df = pd.read_csv('/datasets/music_log_upd_en.csv')
- genre_rock = df[(df['genre_name'] == 'Rock')&(df['total_play_seconds'] != 0)]
- genre_rock_max = genre_rock['total_play_seconds'].max()
- print('The maximum listening time in the rock genre is:',genre_rock_max)
- genre_rock_min = genre_rock['total_play_seconds'].min()
- print('The minimum listening time in the rock genre is:',genre_rock_min)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement