I am working from this Kaggle notebook :
https://www.kaggle.com/kitakoj18/exploring-wine-descriptions-with-nlp-and-kmeans
Please see in [15] section where the notebook is trying to run :
variety_df['cluster'] = kmeans.labels_
This results in the error message :
/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.
How can this be fixed? I can't make sense of it from the docs.
Thank you.