mirror of
https://github.com/ilri/csv-metadata-quality.git
synced 2024-12-30 16:04:29 +01:00
csv_metadata_quality/app.py: skip abstract in separator check
Also skip abstract in the separator check, since it's rare to have any "|" here, but more likely that if one is present then it's for a reason.
This commit is contained in:
parent
fbb625be5c
commit
8db1e36a6d
@ -124,9 +124,9 @@ def run(argv):
|
||||
df[column] = df[column].apply(fix.unnecessary_unicode)
|
||||
|
||||
# Fix: invalid and unnecessary multi-value separators. Skip the title
|
||||
# field because sometimes "|" is used to indicate something like a
|
||||
# subtitle.
|
||||
match = re.match(r"^.*?title.*$", column)
|
||||
# and abstract fields because "|" is used to indicate something like
|
||||
# a subtitle.
|
||||
match = re.match(r"^.*?(abstract|title).*$", column)
|
||||
if match is None:
|
||||
df[column] = df[column].apply(fix.separators, field_name=column)
|
||||
# Run whitespace fix again after fixing invalid separators
|
||||
|
Loading…
Reference in New Issue
Block a user