SE
Size: a a a
SE
ᅠ
ᅠ
SE
SE
SE
ᅠ
ᅠ
SE
ᅠ
SE
ᅠ
S
def phone_number_is_valid(number, **kwargs):
"""Given a phone number and a country code, returns True if the phone number is valid, otherwise False."""
#ensure_definition(number, country)
try:
pn = phonenumbers.parse(number, country)
except:
return False
if phonenumbers.is_possible_number(pn) and phonenumbers.is_valid_number(pn):
return True
return False
s1 = pd.Series([])
for country in alpha_codes:
s1.append(df[(df['Phone No_'].apply(phone_number_is_valid(country='{}'.format(country))) == True)])
phone_number_is_valid
?AK
𝕬
def phone_number_is_valid(number, **kwargs):
"""Given a phone number and a country code, returns True if the phone number is valid, otherwise False."""
#ensure_definition(number, country)
try:
pn = phonenumbers.parse(number, country)
except:
return False
if phonenumbers.is_possible_number(pn) and phonenumbers.is_valid_number(pn):
return True
return False
s1 = pd.Series([])
for country in alpha_codes:
s1.append(df[(df['Phone No_'].apply(phone_number_is_valid(country='{}'.format(country))) == True)])
phone_number_is_valid
?AK
def phone_number_is_valid(number, **kwargs):
"""Given a phone number and a country code, returns True if the phone number is valid, otherwise False."""
#ensure_definition(number, country)
try:
pn = phonenumbers.parse(number, country)
except:
return False
if phonenumbers.is_possible_number(pn) and phonenumbers.is_valid_number(pn):
return True
return False
s1 = pd.Series([])
for country in alpha_codes:
s1.append(df[(df['Phone No_'].apply(phone_number_is_valid(country='{}'.format(country))) == True)])
phone_number_is_valid
?AK
AK
AK