movie_list=[] genre_list = def map_genres(row): try: glist=eval(row.genres) except: glist=[ print(f"bad data for {row.ti

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

movie_list=[] genre_list = def map_genres(row): try: glist=eval(row.genres) except: glist=[ print(f"bad data for {row.ti

Post by answerhappygod »

Movie List Genre List Def Map Genres Row Try Glist Eval Row Genres Except Glist Print F Bad Data For Row Ti 1
Movie List Genre List Def Map Genres Row Try Glist Eval Row Genres Except Glist Print F Bad Data For Row Ti 1 (46.19 KiB) Viewed 32 times
Request refund on 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?
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply