Skip to content

Instantly share code, notes, and snippets.

@CharlyWargnier
Created February 8, 2020 17:25
Show Gist options
  • Select an option

  • Save CharlyWargnier/2a301cd57539bffbb1b138b000d45ba5 to your computer and use it in GitHub Desktop.

Select an option

Save CharlyWargnier/2a301cd57539bffbb1b138b000d45ba5 to your computer and use it in GitHub Desktop.
df[['url','header']] = df["header"].str.split(" ", 1, expand=True)
# Remove slash (/) at the start of each URL
df['url'] = df['url'].str.replace('/','',n=1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment