Skip to main content
Many indicators return data for multiple geographies (countries, regions). The v2 client pivots these automatically into wide-format DataFrames.

Setup

from esios import ESIOSClient

client = ESIOSClient()

Spot price across countries

Indicator 600 (spot price) returns data for 8 European countries:
handle = client.indicators.get(600)
handle.geos_dataframe()
Returns:
   geo_id      geo_name
0       1      Portugal
1       2       Francia
2       3        España
3    8826      Alemania
4    8827       Bélgica
5    8828  Países Bajos
Fetch all geographies:
df = handle.historical("2025-01-01", "2025-01-07")
df
Returns a wide DataFrame with one column per country:
                           Portugal  Francia  España  Alemania  Bélgica  Países Bajos
datetime
2025-01-01 00:00:00+01:00    134.49    12.36  134.49      2.16    10.62         13.62
...
[672 rows × 6 columns]
Each column is a country name. This makes plotting and analysis straightforward.

Compare two countries

df[["España", "Portugal"]].plot(
    figsize=(12, 4),
    title="Spain vs Portugal Spot Price (€/MWh)",
)

Correlation matrix

df.corr().round(2)
Shows how prices correlate across countries:
              Portugal  Francia  España  Alemania  Bélgica  Países Bajos
Portugal          1.00     0.66    0.99      0.42     0.64          0.60
Francia           0.66     1.00    0.67      0.89     0.99          0.87
España            0.99     0.67    1.00      0.44     0.65          0.61
...

Select specific geographies

Use geo_ids to fetch only the countries you need, reducing API calls:
spain_id = handle.resolve_geo("España")
france_id = handle.resolve_geo("Francia")

df_subset = handle.historical(
    "2025-01-01", "2025-01-07",
    geo_ids=[spain_id, france_id],
)
df_subset
Returns only the selected columns:
                           España  Francia
datetime
2025-01-01 00:00:00+01:00  134.49    12.36
...
[672 rows × 2 columns]

Next steps

Build docs developers (and LLMs) love