Skip to content
Advertisement

Tag: python-phonenumber

Populating Country column from international phone numbers

I have a dataframe with several data including the column phone. I would like to create a column name country, based on the phone numbers. The phone numbers are in the format +country_code_phonenumber, i.e.,for several countries. Example What is the best way to do this with the library phonenumbers? Or is there another way to do it that I’m missing?

Advertisement