You can apply a filter to an entire data set in one go, no need to loop.