Skip to content

Instantly share code, notes, and snippets.

@thepycoach
Created March 6, 2021 00:11
Show Gist options
  • Select an option

  • Save thepycoach/5daddd902fe86bdfef14347aae3db0b1 to your computer and use it in GitHub Desktop.

Select an option

Save thepycoach/5daddd902fe86bdfef14347aae3db0b1 to your computer and use it in GitHub Desktop.
#creating column (extract)
df_movie = df_netflix_2019[df_netflix_2019['type']=='Movie']
df_movie = df_movie.assign(minute = df_movie['duration'].str.extract(r'(\d+)', expand=False).astype(int))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment