From the sample dataset 'iris', i have created a dataframe df as follows :
import seaborn as sns
df = sns.load_dataset('iris')
From this i created another dataframe d2 & from the '_is_view' flag, i can see that the d2 is created as a copy (rather than a view). Since d2 is created as a copy, any operations on it (say dropping a column as shown in screenshot below) should not result in SettingWithCopyWarning. But still i am getting the warnings as shown below. Can anyone please let me know why i am seeing the warnings 1) in case of dropping a column 2) in case of modifying a column. If d2 was a view rather than copy, then these warnings are expected as it may result in modifying the df. But not sure why it is so in case of copy.