better ship detectionn, print if looping
This commit is contained in:
parent
ca3ac107a2
commit
8c993c7555
|
@ -54,9 +54,7 @@ def toHtml():
|
|||
|
||||
def isShip(row):
|
||||
try:
|
||||
# if str(int(row[0])) == row[0]:
|
||||
# return True
|
||||
if row[0].strip().lower() == 'import' or row[0].strip().lower() == 'rexport':
|
||||
if row[0].isdigit() or row[0].strip().lower() == 'import' or row[0].strip().lower() == 'rexport':
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
@ -101,6 +99,9 @@ def csvToJSON(prefix):
|
|||
break
|
||||
currRow = rows[i]
|
||||
ships.append(thisShip)
|
||||
else:
|
||||
print c
|
||||
print thisRow
|
||||
data['ships'] = ships
|
||||
d.append(data)
|
||||
outFile = prefix + "Data.json"
|
||||
|
|
Loading…
Reference in New Issue
Block a user