remove duplicate rows if unique
@@ -420,7 +420,6 @@ class Parser():
record.append(fields_lookup[field.lower()][0](endpoint))
# remove rows that are all zero or 'NO DATA'
if not nonzero or not all(item == '0' or item == 'NO DATA' for item in record):
- if not (unique and record in records):
records.append(record)
# remove columns that are all zero or 'NO DATA'
@@ -440,6 +439,9 @@ class Parser():
del row[val]
del fields[val]
if len(fields) > 0:
+ if unique:
+ matrix = list(set(records))
+ else:
matrix = records
if not nonzero and not unique:
for endpoint in endpoints:
