From ea8e643dc4916e0150e888b0df3152c664f81f98 Mon Sep 17 00:00:00 2001 From: eb5194 Date: Tue, 19 Jan 2021 15:20:58 +0100 Subject: [PATCH] add_electricity.py Resolve FutureWarning 771 Index.__or__ operating as set operation is deprecated --- scripts/add_electricity.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/add_electricity.py b/scripts/add_electricity.py index 8fc8ad5c..3f151977 100755 --- a/scripts/add_electricity.py +++ b/scripts/add_electricity.py @@ -332,7 +332,7 @@ def attach_hydro(n, costs, ppl): country = ppl['bus'].map(n.buses.country).rename("country") - inflow_idx = ror.index | hydro.index + inflow_idx = ror.index.union(hydro.index) if not inflow_idx.empty: dist_key = ppl.loc[inflow_idx, 'p_nom'].groupby(country).transform(normed)