From 955d6837fda2e9b2142e291c28078067f5b9752c Mon Sep 17 00:00:00 2001 From: Fabian Neumann Date: Wed, 13 Mar 2024 13:42:29 +0100 Subject: [PATCH] district heating: handle missing GB data for 2020-2021 --- scripts/build_energy_totals.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/build_energy_totals.py b/scripts/build_energy_totals.py index 29cf8182..9282c0e7 100644 --- a/scripts/build_energy_totals.py +++ b/scripts/build_energy_totals.py @@ -611,6 +611,11 @@ def build_district_heat_share(countries, idees): district_heat_share.name = "district heat share" + # restrict to available years + district_heat_share = ( + district_heat_share.unstack().dropna(how="all", axis=1).ffill(axis=1) + ) + return district_heat_share