Skip to content

Instantly share code, notes, and snippets.

@sid321axn
Created August 19, 2020 09:28
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 sid321axn/7323971e5f1eea78e3b9346d70dc8d46 to your computer and use it in GitHub Desktop.
Save sid321axn/7323971e5f1eea78e3b9346d70dc8d46 to your computer and use it in GitHub Desktop.
df['hostname_length'] = df['url'].apply(lambda i: len(urlparse(i).netloc))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment