Skip to content

Instantly share code, notes, and snippets.

@amankharwal
Last active September 26, 2023 15:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save amankharwal/dac09a47d3ab37080aa957b5328d6b6d to your computer and use it in GitHub Desktop.
Save amankharwal/dac09a47d3ab37080aa957b5328d6b6d to your computer and use it in GitHub Desktop.
tv_shows['Rotten Tomatoes'] = tv_shows['Rotten Tomatoes'].fillna('0%')
tv_shows['Rotten Tomatoes'] = tv_shows['Rotten Tomatoes'].apply(lambda x : x.rstrip('%'))
tv_shows['Rotten Tomatoes'] = pd.to_numeric(tv_shows['Rotten Tomatoes'])
tv_shows['IMDb'] = tv_shows['IMDb'].fillna(0)
tv_shows['IMDb'] = tv_shows['IMDb']*10
tv_shows['IMDb'] = tv_shows['IMDb'].astype('int')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment