So I have this code
for idx, item in df['product_code'].iteritems():
value = item in dj['product_numb'].values
if value == False:
df = df.drop(idx)
And I have a csv with over 30k rows and 600+ columns; df
.
Dataframe dj
is a smaller DataFrame with the contents I want to match in df
.
Main questions is, how do I make this take less than 3 hours to complete?