|
|
|
@ -45,10 +45,13 @@ def produce(match_all):
|
|
|
|
|
rows = [] |
|
|
|
|
weight = get_weight(ii) |
|
|
|
|
for lo in sorted(los.los): |
|
|
|
|
is_matched = 1 if lo in match_all[ii] else 0 |
|
|
|
|
is_matched = 1 if ii.lower() == los.los[lo]['model'].lower() else 0 |
|
|
|
|
r = [lo, is_matched, los.los[lo]['weight']] |
|
|
|
|
if is_matched: |
|
|
|
|
try: |
|
|
|
|
r += weight[lo][1:] |
|
|
|
|
except KeyError: |
|
|
|
|
# print(ii, ' = ', is_matched, ' / ', lo) |
|
|
|
|
pass |
|
|
|
|
rows.append(r) |
|
|
|
|
_f = '%s-step4.csv' % ii |
|
|
|
|
create_csv(_f, rows, directory='part4') |
|
|
|
|