question
i was able to figure it out. no need for assistance anymore. thanks
movie_list=[] genre_list = def map_genres(row): try: glist=eval(row.genres) except: glist=[ print(f"bad data for {row.title}") for g in glist: movie_list.append(row.imdb_id) genre_list.append(g['name']) =df.apply(map_genres, axis=1) Using these two lists, construct a new DataFrame with a column for imdb_id and genre How many movies are in the family genre? Which genre has the most movies?
Request refund on movie_list=[] genre_list = def map_genres(row): try: glist=eval(row.genres) except: glist=[ print(f"bad data for {row.ti
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am