How to skip the headers when processing a csv file using Python?
Your reader variable is an iterable, by looping over it you retrieve the rows. To make it skip one item before your loop, simply call next(reader, None) and ignore the return value. You can also simplify your code a little; use the opened files as context managers to have them closed automatically: with open(“tmob_notcleaned.csv”, “rb”) … Read more