From 520cad53a2e90d9af0b871f3360e8ff8df065d71 Mon Sep 17 00:00:00 2001 From: Fabian Neumann Date: Wed, 28 Dec 2022 14:11:47 +0100 Subject: [PATCH] address sum(level) deprecation --- scripts/plot_network.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/scripts/plot_network.py b/scripts/plot_network.py index 521da448..257b565f 100644 --- a/scripts/plot_network.py +++ b/scripts/plot_network.py @@ -119,8 +119,6 @@ def plot_map(network, components=["links", "stores", "storage_units", "generator tech_colors = snakemake.config['plotting']['tech_colors'] - tech_colors = snakemake.config['plotting']['tech_colors'] - n = network.copy() assign_location(n) # Drop non-electric buses so they don't clutter the plot @@ -173,7 +171,7 @@ def plot_map(network, components=["links", "stores", "storage_units", "generator costs.index = pd.MultiIndex.from_tuples(costs.index.values) threshold = 100e6 # 100 mEUR/a - carriers = costs.sum(level=1) + carriers = costs.groupby(level=1).sum() carriers = carriers.where(carriers > threshold).dropna() carriers = list(carriers.index)