Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

pycountry get

def get_country_code(x):
    return pycountry.countries.get(name=x).alpha_3

df = get_data('data.csv')
df['Code'] = df['Country'].apply(get_country_code)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #pycountry
ADD COMMENT
Topic
Name
7+8 =