def _count_lines(self, filename):
        with open(filename) as f:
            for i, l in enumerate(f):
                pass
        return i + 1
Efficiently count the number of lines in a file.
dataset/ETHPy150Open pandaproject/panda/panda/tasks/import_csv.py/ImportCSVTask._count_lines