Fix structure of the grouped dataframe

This commit is contained in:
ekatef 2023-09-27 14:41:00 +03:00
parent 89d140cd7a
commit ce8b89d1e2

View File

@ -203,7 +203,7 @@ def prepare_building_stock_data():
(building_data.type == "Heated area [Mm²]") (building_data.type == "Heated area [Mm²]")
& (building_data.detail != "Total") & (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 = pd.concat(
[ [
area, area,