From 3e8ab11ba62a302ad113440f6d9f6d5f6945c2ea Mon Sep 17 00:00:00 2001 From: Alex Jadczak Date: Tue, 27 Jun 2023 12:14:12 -0400 Subject: [PATCH] bug-fix: Pandas set indexing error Current version of Pandas will throw the following error when indexing using a set. TypeError: Passing a set as an indexer is not supported. Use a list instead. --- wfdb/io/annotation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wfdb/io/annotation.py b/wfdb/io/annotation.py index 655d1212..f1b2ac96 100644 --- a/wfdb/io/annotation.py +++ b/wfdb/io/annotation.py @@ -1352,7 +1352,7 @@ def get_contained_labels(self, inplace=True): else: raise Exception("No annotation labels contained in object") - contained_labels = label_map.loc[index_vals, :] + contained_labels = label_map.loc[list(index_vals), :] # Add the counts for i in range(len(counts[0])):