Created
August 19, 2020 09:34
-
-
Save sid321axn/f3d44e6b01e85a23b70e8ba875828fb4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def letter_count(url): | |
letters = 0 | |
for i in url: | |
if i.isalpha(): | |
letters = letters + 1 | |
return letters | |
df['count-letters']= df['url'].apply(lambda i: letter_count(i)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment