Registry / data / eurostat

eurostat

JSON →
library1.1.1pypypi✓ verified 90d ago

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
INSTALL
IMPORT
SIG · EUROSTAT
E
eurostat
datapythonv1.1.1
Install
7.9s avg
Import
1439ms
Disk
167MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v1.1.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 1.484s · 167.8MB
glibc
py 3.10–3.95 runs
installs and imports cleanly · install 7.9s · import 1.394s · 160MB
167MB installed
● package 167MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

get_data_df
✓ from eurostat import get_data_df
✗ import eurostat; eurostat.get_data_df(...)
Works but less conventional; direct import is preferred
EurostatDataset
✓ from eurostat import EurostatDataset
Class-based access; no common mistake

Download dataset 'tps00001' (population) as a pandas DataFrame.

from eurostat import get_data_df df = get_data_df('tps00001') print(df.head())
Debug
Known issues
gotchaEurostat 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.
affects: all
gotchaLarge 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.
affects: all
gotchaColumn names are multilingual codes (e.g., 'geo', 'TIME'); you must map them manually.
fix
Use 'columns_rename' parameter or rename after download.
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'eurostat'
Package not installed or installed in wrong Python environment.
fix
Run 'pip install eurostat' in the correct environment.
HTTPError: 403 Client Error: Forbidden for url
Eurostat API rate limiting or temporary restriction.
fix
Wait a few minutes and retry; do not make rapid requests.
Unable to parse the downloaded file
Eurostat TSV format changed or dataset not available.
fix
Check the dataset code and Eurostat status page.
Upgrade
Version history
1.1.1latest on PyPI · released Jun 13, 2024
Audit
Dependencies
pandasrequiredRequired for DataFrame output
requestsrequiredHTTP requests to Eurostat API
Agent activity
12 hits · last 30 days
node
12
Resources
eurostat — pip install eurostat · libregistry