When I look at the answer to a similiar question as shown in this link: Pandas: adding column with the length of other column as value
I come across an issue where the solution its suggesting i.e
df['name_length'] = df['seller_name].str.len()
Throws the following warning
'''
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
'''
My question is: How could this be done inorder to prevent this warning from occuring? As in this command I would like to add a new column to the original dataframe not create some sort of copy of a slice.