Created
August 19, 2020 09:33
-
-
Save sid321axn/ff2d6b78c926d0621b0ca654cc7a67db 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 digit_count(url): | |
digits = 0 | |
for i in url: | |
if i.isnumeric(): | |
digits = digits + 1 | |
return digits | |
df['count-digits']= df['url'].apply(lambda i: digit_count(i)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment