Skip to content

Commit

Permalink
Skip weird rows (in particular, empty ones).
Browse files Browse the repository at this point in the history
  • Loading branch information
psyhtest committed Dec 4, 2018
1 parent 73a058e commit dfe75c4
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions program/tool-prepare-dataset/prepare.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,11 +214,15 @@ def prepare_reshape(row):
dataset_files = []
desc_dataset_files = {}
for row in rows:
# Column 0 defines network name but not all the rows has it
if row[0]:
net_name = row[0]
else:
row[0] = net_name
# Column 0 defines network name but not all rows have it
try:
if row[0]:
net_name = row[0]
else:
row[0] = net_name
except:
ck.out('Skip row {}'.format(row))
continue

# Run preparation func
try:
Expand Down

0 comments on commit dfe75c4

Please sign in to comment.