The isin()
method does this for you and is part of pandas. It's function is to compare a column to an array of values and returns True
if a value in the pandas data frame is in the array and False
if not.
values_not_in_array = df[~df.Suburb.isin(L)].Suburb
values_in_array = df[df.Suburb.isin(L)].Suburb