I have a df (df1) that looks like:
df1 = pd.DataFrame([ [\'YYZ\', \'SFO\', 1], [\'YYZ\', \'YYD\', 1], [\'YYZ\', \'EWR\', 1], [\'Y
the ~ symbol reverses the isin and makes it effectively a isnotin