From 1df8f3c360bf9ce077fc8886bc9517ec761c5db4 Mon Sep 17 00:00:00 2001 From: kaklise Date: Tue, 7 May 2024 08:26:49 -0700 Subject: [PATCH] resolve pandas future warning, integer keys --- wntr/metrics/topographic.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/wntr/metrics/topographic.py b/wntr/metrics/topographic.py index 452cd0b2b..7741b4d50 100644 --- a/wntr/metrics/topographic.py +++ b/wntr/metrics/topographic.py @@ -232,9 +232,7 @@ def valve_segments(G, valve_layer): seg_label[all_names.index(node_name)] = seg_index # Collect valved link names - valved_link_names = [] - for i, row in valve_layer.iterrows(): - valved_link_names.append(row[0]) + valved_link_names = list(valve_layer['link'].unique()) # Remove valved edges from G valved_edges = []