Skip to content
Snippets Groups Projects
Commit 9d6ac207 authored by Andreas Beckmann's avatar Andreas Beckmann
Browse files

skip #-commented lines in *.csv

parent 17f3b5ed
Branches
Tags
No related merge requests found
...@@ -15,7 +15,7 @@ ID,selected ...@@ -15,7 +15,7 @@ ID,selected
39,2014.1 39,2014.1
22,2015.1 22,2015.1
50,2017.1 50,2017.1
12,2018.1 #12,2018.1
60,2019.1 60,2019.1
10,2020.1 10,2020.1
35,2021.1 35,2021.1
......
...@@ -404,6 +404,8 @@ def read_csv_file(filename): ...@@ -404,6 +404,8 @@ def read_csv_file(filename):
for row in reader: for row in reader:
if len(row) == 0: if len(row) == 0:
continue continue
if row[0].startswith('#'):
continue
if len(row) != header_len: if len(row) != header_len:
print("BAD DATA ROW ", ", ".join(row)) print("BAD DATA ROW ", ", ".join(row))
continue continue
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment