eurostat
raw JSON → 1.1.1 verified Mon Apr 27 auth: no python
A Python package to download data from Eurostat, the statistical office of the European Union. Version 1.1.1 supports pandas DataFrames, caching, and bulk downloads. Low release cadence; last release in 2022.
pip install eurostat Common errors
error ModuleNotFoundError: No module named 'eurostat' ↓
cause Package not installed or installed in wrong Python environment.
fix
Run 'pip install eurostat' in the correct environment.
error HTTPError: 403 Client Error: Forbidden for url ↓
cause Eurostat API rate limiting or temporary restriction.
fix
Wait a few minutes and retry; do not make rapid requests.
error Unable to parse the downloaded file ↓
cause Eurostat TSV format changed or dataset not available.
fix
Check the dataset code and Eurostat status page.
Warnings
gotcha Eurostat changes dataset IDs and column names without notice; code may break after a few months. ↓
fix Always check Eurostat API or website for current dataset codes.
gotcha Large datasets may download as multiple files; the package auto-aggregates but can be slow. ↓
fix Use 'get_data_df' with 'pars=TXT' or filter parameters to limit size.
gotcha Column names are multilingual codes (e.g., 'geo', 'TIME'); you must map them manually. ↓
fix Use 'columns_rename' parameter or rename after download.
Imports
- get_data_df wrong
import eurostat; eurostat.get_data_df(...)correctfrom eurostat import get_data_df - EurostatDataset
from eurostat import EurostatDataset
Quickstart
from eurostat import get_data_df
df = get_data_df('tps00001')
print(df.head())