annotation.py:get_contained_labels (1335): pandas throws TypeError: Passing a set as an indexer is not supported. Use a list instead.
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Jupyter Notebook
- Sterne
- 853
- Forks
- 322
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
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.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne in annotation.py bei get_contained_labels, insbesondere bei der Indizierung um die Zeilen 1335-1355, und untersuche weitere Vorkommen der set-basierten label_map-Indizierung. Überprüfe den betroffenen Zugriffspfad für Annotationen mit pandas 2.1.3 oder höher; abgeschlossen ist die Aufgabe, wenn kein TypeError für set-Indexer mehr ausgelöst wird.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- pandas, python
- Bereich
- data
- Issue-Typ
- Bug
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Aktivitätsstatus
- Veraltet
- Klarheit
- Klar beschrieben
- Anfängerfreundlichkeit
- 45/100