simplify, also its a list

This commit is contained in:
Josh Burman
2021-11-30 20:00:59 +00:00
parent 3e708c0137
commit e605f787ed

View File

@ -15,6 +15,7 @@ def items_csv_to_dict(items_csv_reader):
count = 0
for key, col in enumerate(headers):
count += 1
if key == 0:
item[col] = row[key]
elif col == 'b_param':
@ -25,9 +26,8 @@ def items_csv_to_dict(items_csv_reader):
'value': row[key],
'type': 'metadata'
})
elif count == (1 - len(headers.split(','))):
elif count == len(headers):
item['b_param'] = float(row[key])
count += 1
items.append(item)