Guest User

Untitled

a guest
Mar 26th, 2019
56
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import pandas as pd
  2. df = pd.read_csv('music_log_upd.csv')
  3.  
  4. genre_grouping = df.groupby('user_id')['genre_name']
  5. search_id = ''
  6. group = genre_grouping
  7. def user_genres(group):
  8. for col in group:
  9. if len(col[1]) > 50:
  10. user = col[0]
  11. return user
  12. search_id = user
  13. print(search_id)
RAW Paste Data