Skip to content

Commit b99be98

Browse files
committed
#57 fix skip of first line, of columns are not present
1 parent cdb8db9 commit b99be98

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/batch.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@ def processcsv(inputfile, outputfile, type, lang, statusupdate):
9292
write_status_update(statusupdate, len(data), 0)
9393
# iterate over the rows
9494
for index, row in data.iterrows():
95-
# skip first line, because it contains the column names
96-
if index == 0:
95+
# skip first line only if it contains the column names
96+
if index == 0 and all(str(row[col]).strip() == col for col in columns):
9797
continue
9898
# write statistics
9999
write_status_update(statusupdate, len(data), index)

0 commit comments

Comments
 (0)