Skip to content

Instantly share code, notes, and snippets.

@erap129
Created January 28, 2022 14:51
Show Gist options
  • Select an option

  • Save erap129/8aeea5a8f50a6bd7e1c894ff06939c45 to your computer and use it in GitHub Desktop.

Select an option

Save erap129/8aeea5a8f50a6bd7e1c894ff06939c45 to your computer and use it in GitHub Desktop.
movies_df['genre'] = movies_df['genre'].apply(lambda x: x.split('|'))
movies_df_exploded = movies_df.explode('genre')
px.histogram(movies_df_exploded, x='genre', height=400, title='Movie count by genre').update_xaxes(categoryorder="total descending")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment