annotation.py:get_contained_labels (1335): pandas throws TypeError: Passing a set as an indexer is not supported. Use a list instead.
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 45/100
Research direction
Start in annotation.py at get_contained_labels, especially the indexing around lines 1335-1355, and inspect other occurrences of set-based label_map indexing. Verify the affected annotation access path with pandas 2.1.3 or later; done means it no longer raises the set-indexer TypeError.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- Jupyter Notebook
- Stars
- 853
- Forks
- 322
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from MIT-LCP/wfdb-python
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
MIT-LCP/wfdb-python#568 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
MIT-LCP/wfdb-python#557 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 58/100
MIT-LCP/wfdb-python#554 ·
-
WFDB path ignored Open
Difficulty 4/5 3-5 days Newbie friendliness 35/100
MIT-LCP/wfdb-python#545 ·
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
MIT-LCP/wfdb-python#540 ·
All issues in MIT-LCP/wfdb-python
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
openml/openml-python#1749 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
desihub/desisurveyops#486 · 3 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
scverse/spatialdata#1256 ·