better removal of linkParams for the CSV

This commit is contained in:
Mylloon 2021-08-24 10:45:22 +02:00
parent e9776b97b1
commit 5c4dd816f6

View file

@ -90,7 +90,9 @@ def save(elements):
return return
filename = "results.csv" filename = "results.csv"
with open(filename, "w") as f: with open(filename, "w") as f:
f.write(";".join(list(elements[0].keys())[:-1])) topCSV = list(elements[0].keys()) # create a copy of the first element keys
topCSV.remove("linkParams") # remove linkParams
f.write(";".join(topCSV))
f.write("\n") f.write("\n")
for element in elements: for element in elements:
if element != "linkParams": if element != "linkParams":