我正在使用此Kaggle笔记本工作:
https://www.kaggle.com/kitakoj18/exploring-wine-descriptions-with-nlp-and-kmeans
请在[15]部分中查看笔记本试图运行的位置:
variety_df['cluster'] = kmeans.labels_
这将导致错误消息:
/opt/conda/lib/python3.6/site-packages/ipykernel_launcher.py:1: 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: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
"""Entry point for launching an IPython kernel.
如何解决?我无法从文档中理解它。
谢谢。