SHARE
TWEET

Untitled

a guest Mar 26th, 2019 54 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
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top