-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
When exporting data by clicking on "download the set as a .tsv file", the resulting file presents shifted columns when data is not present. See for example in the following screenshots : export from the dataset Apriles-ODAS and "preview" from OpenScraper:
- in the preview, there is no "date" and no "données économiques", the columns are blank
- in the TSV,
- the "date" contains "partenaires" (the column right after date), one shift to the left,
- the "partenaires" contains "résumé" (if there is no "données économiques") or "données économiques", one or two shifts to the left
- "données économiques" contains "tags" or "résumé", one or two shifts since no other empty column is between them
- "résumé" contains "tags" or "website" (which, in fact, also contains e-mails…)
- "tags" contains "website" or "adresse"
Suggested fix : a little bit like in
OpenScraper/openscraper/controller.py
Line 1362 in c96c6d8
| item_list.append(item["link_data"] if "link_data" in item.keys() else '') |
if id_field in item.keys() :
item_list.append( " ".join(item[ id_field ]) )
by
if id_field in item.keys() :
item_list.append( " ".join(item[ id_field ]) )
else :
item_list.append("")
to ensure empty values are correctly written at line 1369 in the resulting file.
Metadata
Metadata
Assignees
Labels
No labels

