oneapi-src / oneapi-src/oneAPI-samples
profile_utils.py:164 causes warning message
オープン
まだ誰も着手していません。
bug
- 主要言語
- C++
- スター
- 1.2k
- フォーク
- 745
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
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
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
報告されている Python 3.10.6 と Pandas 1.5.3 のバージョンで、まず python3 profile_utils.py <your onednn verbose log file> を実行します。profile_utils.py:164 を調査し、SettingWithCopyWarning を再現します。コマンドがコンソール出力にその警告を表示せずに完了すれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- pandas, python
- 領域
- data
- issue の種類
- バグ
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 42/100