Could someone please explain why loc behaves different from what I expect?
The code is
educated_less = df.loc[ ~df['education'].isin(['Masters', 'Bachelors', 'Doctorate'])]
It seems that loc should return only one column 'education' following the isin condition however
it returns entire df dataframe with all of the columns and isin condition is applied.