In a program, I have the following pandas-related operations
df_data['id'][i] = test[‘area’][i]
The code will work, but running the program will generate the following message
C:\Users\AppData\Local\Temp/ipykernel_22744/4097485461.py:3: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
df_data['area'][i] = test['area'][i]
I am not very clear about this message after reading the related documentation, and what should be the best practice to modify this line of operation? Besides, are there any ways to suppress this kind of message without letting them to print out.