a guest Feb 18th, 2020 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- def genre_weekday(df, day, time1, time2):
- genre_list = df[ (df['weekday'] == day)&(['time'] > time1)&(['time'] < time2)]
- genre_list_grouped = genre_list.groupby('genre_name').count()
- genre_list_sorted = genre_list_grouped.sort_values(by = 'genre_name').head(30)
- return genre_list_sorted
RAW Paste Data