1
0
mirror of https://github.com/ilri/csv-metadata-quality.git synced 2024-11-22 05:45:02 +01:00

csv_metadata_quality/check.py: Always return field

We always need to return the field back so apply doesn't set it to
null when creating the new data frame.
This commit is contained in:
Alan Orth 2019-07-27 01:28:08 +03:00
parent 1d861f263b
commit 3cf9f9452b
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9

View File

@ -22,6 +22,8 @@ def issn(field):
if not issn.is_valid(value):
print(f'Invalid ISSN: {value}')
return field
def isbn(field):
"""Check if an ISBN is valid.
@ -45,6 +47,8 @@ def isbn(field):
if not isbn.is_valid(value):
print(f'Invalid ISBN: {value}')
return field
def separators(field):
"""Check for invalid multi-value separators (ie "|" or "|||").
@ -66,3 +70,6 @@ def separators(field):
if len(match) > 0:
print(f'Invalid multi-value separator: {field}')
return field