【855】country converter, ISO alpha 3

发布时间 2023-07-09 11:18:18作者: McDelfino

Ref: country-converter 1.0.0

Ref: Python-pycountry | Understand How to Use pycountry


These two python libraries are both used to process information about country names. For the library of country-converter, it can be used to convert the dirty data (country names with different writting types) to the nomalized type.

Example:

import country_converter as coco
some_names = ['United Rep. of Tanzania', 'DE', 'Cape Verde', '788', 'Burma', 'COG',
              'Iran (Islamic Republic of)', 'Korea, Republic of',
              "Dem. People's Rep. of Korea"]
standard_names = coco.convert(names=some_names, to='name_short')
print(standard_names)