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:
parent
1d861f263b
commit
3cf9f9452b
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user