BioPandas/biopandas

SettingWithCopyWarning

Opened this issue · 0 comments

These tests raise a warning with the latest version of Pandas:
https://github.com/BioPandas/biopandas/blob/11362ec459d9c9c265d2f2416223569e9cf4fc93/biopandas/pdb/tests/test_multiple_models.py

The specific warning is 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
idxs["end_idx"] = ends.line_idx.values