From e07f0e5c2b5bb34e8fcfb3b127ac9e30109beedc Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 17 Jan 2024 16:09:36 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- scripts/plot_network.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/plot_network.py b/scripts/plot_network.py index 650a24ef..31e72289 100644 --- a/scripts/plot_network.py +++ b/scripts/plot_network.py @@ -271,10 +271,11 @@ def plot_h2_map(network, regions): assign_location(n) h2_storage = n.stores.query("carrier == 'H2'") - regions["H2"] = h2_storage.rename( - index=h2_storage.bus.map(n.buses.location) - ).e_nom_opt.groupby(level=0).sum().div( - 1e6 + regions["H2"] = ( + h2_storage.rename(index=h2_storage.bus.map(n.buses.location)) + .e_nom_opt.groupby(level=0) + .sum() + .div(1e6) ) # TWh regions["H2"] = regions["H2"].where(regions["H2"] > 0.1)