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
+351xxxxxxxxx
+1xxxxxxxxxx
+34xxxxxxxxx
+55xxxxxxxxxxx
What is the best way to do this with the library phonenumbers? Or is there another way to do it that I'm missing?
Thank you in advance!