Is it possible to ignore or skip the first row in a CSV file with filter
?
filtered = filter(lambda p: celery == p[7],reader)
csv.writer(open(filename, 'w',newline=''), delimiter=',').writerows(filtered)
I'm trying to read and filter only the 7th row containing the word celery
but because the filter keeps reading the header stuff
it messes up the line under it.
Stuff
Apple Pear Orange Cracker Honey Cheese Grape Bread Tomato Celery Lettuce Carrot
Apple Pear Orange Cracker Honey Cheese Grape Bread Tomato Celery Lettuce Carrot
Apple Pear Orange Cracker Honey Cheese Grape Bread Tomato Celery Lettuce Carrot
I think because it can't find celery
it just cuts off the line under it?
ge Cracker Honey Cheese Grape Bread Tomato Celery Lettuce Carrot
Apple Pear Orange Cracker Honey Cheese Grape Bread Tomato Celery Lettuce Carrot
Apple Pear Orange Cracker Honey Cheese Grape Bread Tomato Celery Lettuce Carrot