Skip to content

Instantly share code, notes, and snippets.

@amankharwal
Created January 21, 2021 05:58
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 amankharwal/32dc183b12724989e9061c002290ae5a to your computer and use it in GitHub Desktop.
Save amankharwal/32dc183b12724989e9061c002290ae5a to your computer and use it in GitHub Desktop.
tv_shows_long=pd.melt(tv_shows[['Title','Netflix','Hulu','Disney+',
'Prime Video']],id_vars=['Title'],
var_name='StreamingOn', value_name='Present')
tv_shows_long = tv_shows_long[tv_shows_long['Present'] == 1]
tv_shows_long.drop(columns=['Present'],inplace=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment