Questions tagged [python-phonenumber]

Python port of Google's libphonenumber library.

Python port of Google's libphonenumber library.

18 questions
0
votes
1 answer

How to obtain all the phone numbers in each row of a df, using phonenumbers Python Library?

I want to create a column with all valid phone numbers available in each row of the text column in a data frame using Python's phonenumber library. complains = ['If you validate your data, your confirmation number is 1-23-456-789, for a teacher you…
Steven González
  • 227
  • 1
  • 12
-1
votes
1 answer

How to manage and skip exceptions properly? And phonenumbers lib to cover)

I use https://github.com/daviddrysdale/python-phonenumbers in my project to fix all bad numbers. import csv import phonenumbers with open('base.csv') as f: data = list(csv.reader(f, delimiter=';')) header_row = data[0] header_row[8] = "Fixed…
Bogdan Mind
  • 65
  • 1
  • 1
  • 8
-2
votes
1 answer

Python phonenumbers error str has no attribute country code

I am trying to get the carrier of a phone number I am using phonenumbers in python and keep getting this error ‘str’ object has no attribute ‘country_code’ Here is my code: import phonenumbers num = input("phone number") from phonenumbers import…
1
2