@snippsat: Pandas nor speed were originaly in the scope (first post); if so, I would have proposed the vectored form suggesting
In any way I'm wondering if he/she is asking for advices or asking somebody to do the job for him/her
np.equal
and np.where
for instance.In any way I'm wondering if he/she is asking for advices or asking somebody to do the job for him/her