Skip to content

pytest warning on machine_learning/k_means_clust.py::k_means_clust.ReportGenerator #2282

Closed
@cclauss

Description

@cclauss

@beqakd Each time there is a commit to this repo, we run Travis CI tests and pytest is generating the following warning:

machine_learning/k_means_clust.py::k_means_clust.ReportGenerator

  /home/travis/virtualenv/python3.8.3/lib/python3.8/site-packages/pandas/core/generic.py:5159: 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

    self[name] = value

-- Docs: https://docs.pytest.org/en/stable/warnings.html

Can you please modify the algorithm so that this warning is no longer generated?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions