country-converter
The country converter (coco) - a Python package for converting country names between different classifications schemes
Decision gist · record as of 2026-08-14
Yes, with conditions. The package is well-maintained enough for production use (no known vulnerabilities, active repository, supports current Python versions), but its aging maintenance status (296 days since last release) means you should monitor for updates. The GPLv3 license is a hard blocker if you need to keep your code proprietary. Install it if you regularly work with messy country data and can accept the copyleft requirement.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.9 or later (supports 3.9–3.13); pandas must be installed as a runtime dependency.
- Low install friction with a single runtime dependency on pandas.
- Maintenance status is aging—the last release was 296 days ago, though the repository remains active with recent commits and no archived status.
License · maintenance · safety
copyleft license (copyleft) — Licensed under GPLv3 (copyleft). Any derivative work or distribution must also be licensed under GPLv3; proprietary applications cannot incorporate this package without open-sourcing their own code.
last release 2025-10-22 (296 days) · last repo commit 2025-12-18 · 259 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 2,541,161 downloads/mo, #3,011 on PyPI
Alternatives
Verify before relying
pip install country_converter
import country_converter as coco
cc = coco.CountryConverter()
standard_names = cc.convert(names=['DE', 'France', 'USA'], to='name_short')
print(standard_names)- Whether the regex-based matching handles all edge cases and non-English country name variants reliably.
- Performance characteristics for very large datasets beyond the 1 million-row example mentioned in the description.
What it is and what it does
Country converter (coco) is a Python package that standardizes and matches country names across multiple classification schemes. It solves the problem of inconsistent country naming in datasets by converting between ISO 2-letter codes, ISO 3-letter codes, ISO numeric codes, and common country names. Internally, it uses regex patterns to match variants and stores data in a pandas DataFrame, making it useful for data cleaning and aggregation tasks.
The package includes built-in classifications for UN membership, EU membership, OECD membership, UN regions, continents, and various MRIO and IAM databases. It offers both a Python API and a command-line interface. For pandas Series, a dedicated `pandas_convert()` method provides significant performance gains (described as 4000x speedup for 1 million rows compared to the standard convert method). You can also access the underlying DataFrame directly to filter by membership criteria or build custom concordance matrices.
Use it for
- Clean messy country names in datasets by converting them to standardized ISO codes or short names.
- Filter datasets by country membership in organizations like the EU, OECD, or UN by year.
- Build concordance matrices to map between different country classification schemes used in different data sources.
- Batch-convert large pandas Series of country identifiers to a target format with high performance.
- Match country names from one list against a master list using regex-based fuzzy matching.
- Extract country-level data from multi-source datasets where countries are named inconsistently.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, with conditions.
The package is well-maintained enough for production use (no known vulnerabilities, active repository, supports current Python versions), but its aging maintenance status (296 days since last release) means you should monitor for updates. The GPLv3 license is a hard blocker if you need to keep your code proprietary. Install it if you regularly work with messy country data and can accept the copyleft requirement.
Install
country-converter on PyPI
Before you install
Low install friction with a single runtime dependency on pandas. Maintenance status is aging—the last release was 296 days ago, though the repository remains active with recent commits and no archived status.
Requires Python 3.9 or later (supports 3.9–3.13); pandas must be installed as a runtime dependency.
License in practice
Licensed under GPLv3 (copyleft). Any derivative work or distribution must also be licensed under GPLv3; proprietary applications cannot incorporate this package without open-sourcing their own code.
Quickstart
pip install country_converter
import country_converter as coco
cc = coco.CountryConverter()
standard_names = cc.convert(names=['DE', 'France', 'USA'], to='name_short')
print(standard_names)
Verify before relying
- Whether the regex-based matching handles all edge cases and non-English country name variants reliably.
- Performance characteristics for very large datasets beyond the 1 million-row example mentioned in the description.
Package facts
| License | copyleft license copyleft |
| Python support | Supports the current Python release <4.0,>=3.9 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagepandas |
| Maintenance | Aging 296 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 2,541,161 / month, #3,011 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaEnvironment :: ConsoleIntended Audience :: DevelopersIntended Audience :: End Users/DesktopIntended Audience :: Science/ResearchLicense :: OSI Approved :: GNU General Public License v3 (GPLv3)Operating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9Topic :: Scientific/EngineeringTopic :: Utilities |
Evidence: country_converter-1.3.2-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “country name standardization”
- country-converterConverts and matches country names across different classification…
- pycountry-convertConverts between ISO country codes (alpha-2, alpha-3, numeric),…
- iso3166Converts between ISO 3166-1 country codes (two-letter, three-letter,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Scientific/Engineering packages
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
pandas provides fast, flexible data structures (Series and DataFrame) for loading, cleaning, transforming, and analyzing labeled or relational data in Python.
scipy provides numerical algorithms for mathematics, science, and engineering—including optimization, integration, linear algebra, Fourier transforms, signal and image processing, and ODE solvers—built on numpy arrays.
scikit-learn provides a comprehensive Python library for supervised and unsupervised machine learning, including classification, regression, clustering, dimensionality reduction, and model evaluation tools built on NumPy and SciPy.
Install it if you need to train, evaluate, or deploy supervised or unsupervised learning models.
dill extends Python's pickle module to serialize and deserialize a much wider range of Python objects, including functions, lambdas, classes, and interpreter sessions, to byte streams for storage or network transmission.
Multiprocess is an enhanced fork of Python's standard multiprocessing library that uses dill for better serialization, allowing you to spawn processes with a threading-like API and share complex objects between them.
Install it if you use multiprocessing and encounter pickle serialization limits with lambdas or complex objects.
See also pycountry · iso3166 · pycountry-convert · isocodes · babelfish · hdx-python-country · iso18245 · names-dataset · python-stdnum · cleanco