Skip to content

profile_utils.py:164 causes warning message #1368

@shuangpe

Description

@shuangpe

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions