From d39b579346607a7ffd8ffe71bcc9594a319e6d0d Mon Sep 17 00:00:00 2001 From: Fabian Date: Mon, 18 Dec 2023 12:56:08 +0100 Subject: [PATCH] build_biomass_potentials: fix groupby and transpose --- scripts/build_biomass_potentials.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build_biomass_potentials.py b/scripts/build_biomass_potentials.py index 27b2e0a39..d7c467cf6 100644 --- a/scripts/build_biomass_potentials.py +++ b/scripts/build_biomass_potentials.py @@ -263,7 +263,7 @@ def convert_nuts2_to_regions(bio_nuts2, regions): df.to_csv(snakemake.output.biomass_potentials_all) grouper = {v: k for k, vv in params["classes"].items() for v in vv} - df = df.T.groupby(grouper).sum() + df = df.T.groupby(grouper).sum().T df *= 1e6 # TWh/a to MWh/a df.index.name = "MWh/a"