I have a fairly large data frame from which I need to remove values. I currently use this code:
for sha in shas:
df = df[~df['SHA256'].str.contains(sha, regex=False)]
However, this doesn't scale well if shas gets sufficiently large. Is there a more efficient and faster way to drop elements from a dataframe?