I create a dataframe and (I think) I create a copy out of it. I think I create a copy out of it since ._is_view property is False
import pandas as pddf = pd.DataFrame({'a':[1,2,3],'b':['x','y','z']})df.loc[[True, True, False],'a']._is_viewoutput: FalseSo setting this copy equal to some value should not change the original dataframe, right?
However, the following changes the original dataframe
df.loc[[True, True, False],'a'] = 'abcd'print(df)output: a b0 abcd x1 abcd y2 3 zCan you please help me understand this behavior by pandas?