Skip to content

annotation.py:get_contained_labels (1335): pandas throws TypeError: Passing a set as an indexer is not supported. Use a list instead. #487

Description

@hernot

Using python version of libwfdb 4.1.2 which is according to pypi the latest.

Since lately when accessing the annotations i do get the error

TypeError: Passing a set as an indexer is not supported. Use a list instead.

This is caused by passing the following indexing tuple in line

index_vals = {1, 5}
# annotation.py(1355)get_contained_labels
contained_labels = label_map.loc[index_vals, :]

for now i do fix this by replacing the above line by

contained_labels = label_map.loc[list(index_vals), :]

and any further occurence.

The reason is that pandas has droped support for settype index arround version 2.1.3 which i do have currently installed.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions