From fa8f7887f94af007d49b07a6158ece8250413a25 Mon Sep 17 00:00:00 2001 From: Fabian Neumann Date: Fri, 2 Jul 2021 09:31:41 +0200 Subject: [PATCH] Update scripts/prepare_sector_network.py --- scripts/prepare_sector_network.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/scripts/prepare_sector_network.py b/scripts/prepare_sector_network.py index ddcdc85b..c54e2a2e 100644 --- a/scripts/prepare_sector_network.py +++ b/scripts/prepare_sector_network.py @@ -72,9 +72,7 @@ def create_network_topology(n, prefix): candidates = pd.concat((candidates_p, candidates_n), sort=False) topo = candidates.groupby(["bus0", "bus1"], as_index=False).mean() - topo.rename(index=lambda x: prefix + topo.at[x, "bus0"] - + connector + topo.at[x, "bus1"], - inplace=True) + topo.index = topo.apply(lambda x: prefix + x.bus0 + connector + x.bus1, axis=1) return topo