Skip to content

Instantly share code, notes, and snippets.

@prateekjoshi565
Created April 21, 2019 12:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save prateekjoshi565/609b5ae0b81cfe9d76aae52ce003ec8c to your computer and use it in GitHub Desktop.
Save prateekjoshi565/609b5ae0b81cfe9d76aae52ce003ec8c to your computer and use it in GitHub Desktop.
genre_extract_genres
# an empty list
genres = []
# extract genres
for i in movies['genre']:
genres.append(list(json.loads(i).values()))
# add to 'movies' dataframe
movies['genre_new'] = genres
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment