INCATools / biosample-analysis

analysis of biosamples in INSDC
3 stars 1 forks source link

scoped_mapping_of_biosamples_mixs "value is trying to be set on a copy of a slice" #62

Closed turbomam closed 7 months ago

turbomam commented 3 years ago

Rookie mistake. I thought I addressed this :-(

mapping_candidates.loc[:, "onto_prefix"] = pd.Series(prefix_when_possible).values

/Users/MAM/Documents/gitrepos/biosample-analysis/venv/lib/python3.8/site-packages/pandas/core/indexing.py:1596: 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.obj[key] = _infer_fill_value(value) /Users/MAM/Documents/gitrepos/biosample-analysis/venv/lib/python3.8/site-packages/pandas/core/indexing.py:1745: 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 isetter(ilocs[0], value)