Install & Compatibility
Where this runs
tested against v0.8.0 · 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
muslpy 3.10–3.920 runs
installs and imports cleanly · install 0.0s · import 1.945s · 174.1MB
glibcpy 3.10–3.920 runs
installs and imports cleanly · install 8.7s · import 1.815s · 167MB
175MB installed
● package 175MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
EntsoePandasClient
✓ from entsoe import EntsoePandasClient
✗ from entsoe.entsoe import EntsoePandasClient
EntsoePandasClient is the main client for interacting with the ENTSO-E API and returning data as pandas DataFrames. EntsoeRawClient is available for raw XML output.
This quickstart initializes the EntsoePandasClient with an API key, preferably from an environment variable, and demonstrates how to query day-ahead electricity prices for a specified country and date range. The result is a pandas Series.
import os
from entsoe import EntsoePandasClient
import pandas as pd
# Ensure you have an ENTSO-E API key from https://transparency.entsoe.eu/content/static_content/Static%20content/web%20api/API%20Documentation.html
# Set it as an environment variable or pass directly: api_key='YOUR_API_KEY'
api_key = os.environ.get('ENTSOE_API_KEY', '')
if not api_key:
print("Warning: ENTSOE_API_KEY environment variable not set. Using a placeholder.")
print("Please obtain a key from ENTSO-E and set it before running.")
# Use a dummy key if not set, for the example to at least initialize
# In a real scenario, this would likely cause an authentication error later.
api_key = "dummy_api_key_for_example"
client = EntsoePandasClient(api_key=api_key)
start = pd.Timestamp('20230101', tz='Europe/Brussels')
end = pd.Timestamp('20230102', tz='Europe/Brussels')
country_code = 'BE'
try:
# Query day-ahead prices for Belgium
day_ahead_prices = client.query_day_ahead_prices(country_code, start=start, end=end)
print(f"Day-ahead prices for {country_code} (first 5 rows):\n{day_ahead_prices.head()}")
except Exception as e:
print(f"An error occurred during API query: {e}")
print("Please ensure your API key is correct and valid, and the country code/date range are supported.")
Errors
Common errors & fixes
Missing API key. Please set the 'ENTSOE_API_KEY' environment variable or pass 'api_key' to the constructor.
The ENTSO-E API key was not provided to the EntsoePandasClient constructor or found in the `ENTSOE_API_KEY` environment variable.
fixEnsure you have obtained an API key from the ENTSO-E Transparency Platform and set it as the `ENTSOE_API_KEY` environment variable, or pass it directly: `client = EntsoePandasClient(api_key='YOUR_API_KEY')`.
AttributeError: 'EntsoePandasClient' object has no attribute 'query_intraday_offered_capacity' (or similar error after upgrading to v0.8.0)
The `query_intraday_offered_capacity` function underwent a significant redesign in `v0.8.0`, potentially changing its name, signature, or parameters.
fixConsult the `entsoe-py` documentation or source code for `v0.8.0` to verify the correct function name and parameters for querying intraday offered capacity.
KeyError: "['some_column_name'] not found in axis" or ValueError: cannot reindex on an axis with duplicate labels
Older versions (pre `v0.7.3`) had a bug related to internal DataFrame column renaming during parsing, which could lead to crashes, as reported in GitHub issue #428.
fixUpgrade to `entsoe-py>=0.7.3` to resolve known parsing stability issues and avoid errors related to DataFrame column operations.
xml.etree.ElementTree.ParseError: no element found: line 1, column 0
The ENTSO-E API sometimes returned unexpected content types or malformed XML responses that older `entsoe-py` versions (pre `v0.7.6`) failed to parse correctly.
fixUpgrade to `entsoe-py>=0.7.6` to benefit from fixes that improve handling of various API responses, including unexpected content types and malformed XML.
Upgrade
Version history
0.8.0latest on PyPI · released Apr 14, 2026
Audit
Dependencies
No dependency data recorded yet.