Move this code before CSV parsing, so you will be able to ignore CVS entries that will not be displayed (performance and memory optimization).