oneapi-src / oneapi-src/oneAPI-samples
profile_utils.py:164 causes warning message
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- C++
- Sterne
- 1.2k
- Forks
- 745
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
Summary
The profile_utils.py causes following annoying warning messages. Please figure out a way to eliminate it.
profile_utils.py:164: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
data['time'] = data['time'].astype(float)
Version
Python 3.10.6
Pandas 1.5.3
Environment
Ubuntu 22.04.1 LTS
Steps to reproduce
python3 profile_utils.py
Observed behavior
The annoying warning messages presented above
Expected behavior
No warning messages presented in the console output
Beitragsleitfaden
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 damit, python3 profile_utils.py <your onednn verbose log file> mit den angegebenen Versionen Python 3.10.6 und Pandas 1.5.3 auszuführen. Untersuche profile_utils.py:164 und reproduziere die SettingWithCopyWarning. Die Aufgabe ist abgeschlossen, wenn der Befehl ohne diese Warnung in der Konsolenausgabe beendet 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
- Größtenteils klar
- Anfängerfreundlichkeit
- 42/100