From ce8b89d1e28c4a74d0f5dba927e1dc0645b961de Mon Sep 17 00:00:00 2001 From: ekatef Date: Wed, 27 Sep 2023 14:41:00 +0300 Subject: [PATCH] Fix structure of the grouped dataframe --- scripts/build_retro_cost.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build_retro_cost.py b/scripts/build_retro_cost.py index be06d3ad..bccea3e4 100644 --- a/scripts/build_retro_cost.py +++ b/scripts/build_retro_cost.py @@ -203,7 +203,7 @@ def prepare_building_stock_data(): (building_data.type == "Heated area [Mm²]") & (building_data.detail != "Total") ] - area_tot = area.groupby(["country", "sector"]).sum() + area_tot = area[["country", "sector", "value"]].groupby(["country", "sector"]).sum() area = pd.concat( [ area,