From d70cdc161eff3634760e7be38256f88c75b45c3e Mon Sep 17 00:00:00 2001 From: Eric Larson Date: Fri, 23 Jan 2026 10:01:09 -0500 Subject: [PATCH] Fix for pandas 3.0 --- wfdb/io/annotation.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/wfdb/io/annotation.py b/wfdb/io/annotation.py index 7e75026e..c2fe8d0d 100644 --- a/wfdb/io/annotation.py +++ b/wfdb/io/annotation.py @@ -1469,7 +1469,7 @@ def convert_label_attribute( return label_map = self.create_label_map(inplace=False) - label_map.set_index(label_map[source_field].values, inplace=True) + label_map.set_index(keys=pd.Index(label_map[source_field].values), inplace=True) try: target_item = label_map.loc[ @@ -3057,7 +3057,10 @@ def __init__(self, extension, description, human_reviewed): "human_reviewed": [ac.human_reviewed for ac in ann_classes], } ) -ann_class_table.set_index(ann_class_table["extension"].values, inplace=True) +ann_class_table.set_index( + keys=pd.Index(ann_class_table["extension"].values), + inplace=True, +) ann_class_table = ann_class_table[ ["extension", "description", "human_reviewed"] ]