Skip to content
Snippets Groups Projects
Commit 2e7e64fe authored by jacques.grelet_ird.fr's avatar jacques.grelet_ird.fr
Browse files

remove empty key/value

parent b3c038f5
No related branches found
No related tags found
No related merge requests found
......@@ -33,8 +33,12 @@ class Roscop:
for row in reader:
theKey = row[reader.fieldnames[0]]
# for k in reader.fieldnames:
# print(k, row[k])
for k in reader.fieldnames:
# if the value of key empty, remove the key
if row[k] == '':
row.pop(k)
else:
print(k, row[k])
self.hash[theKey] = row
return
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment