oneapi-src / oneapi-src/oneAPI-samples
profile_utils.py:164 causes warning message
未关闭
还没有人认领这个 Issue。
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 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 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