Advertisement
Guest User

Untitled

a guest
Feb 18th, 2020
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. import pandas as pd
  2. df = pd.read_csv('/datasets/music_log_upd_en.csv')
  3.  
  4. genre_rock = df[(df['genre_name'] == 'Rock')&(df['total_play_seconds'] != 0)]
  5. genre_rock_max = genre_rock['total_play_seconds'].max()
  6. print('The maximum listening time in the rock genre is:',genre_rock_max)
  7. genre_rock_min = genre_rock['total_play_seconds'].min()
  8. print('The minimum listening time in the rock genre is:',genre_rock_min)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement