movie_list=[] genre_list = def map_genres(row): try: glist=eval(row.genres) except: glist=[ print(f"bad data for {row.ti
Posted: Mon Jul 11, 2022 9:55 am
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 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?