mirror of
https://github.com/ilri/csv-metadata-quality.git
synced 2024-11-25 15:18:19 +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):
|
if not issn.is_valid(value):
|
||||||
print(f'Invalid ISSN: {value}')
|
print(f'Invalid ISSN: {value}')
|
||||||
|
|
||||||
|
return field
|
||||||
|
|
||||||
|
|
||||||
def isbn(field):
|
def isbn(field):
|
||||||
"""Check if an ISBN is valid.
|
"""Check if an ISBN is valid.
|
||||||
@ -45,6 +47,8 @@ def isbn(field):
|
|||||||
if not isbn.is_valid(value):
|
if not isbn.is_valid(value):
|
||||||
print(f'Invalid ISBN: {value}')
|
print(f'Invalid ISBN: {value}')
|
||||||
|
|
||||||
|
return field
|
||||||
|
|
||||||
|
|
||||||
def separators(field):
|
def separators(field):
|
||||||
"""Check for invalid multi-value separators (ie "|" or "|||").
|
"""Check for invalid multi-value separators (ie "|" or "|||").
|
||||||
@ -66,3 +70,6 @@ def separators(field):
|
|||||||
|
|
||||||
if len(match) > 0:
|
if len(match) > 0:
|
||||||
print(f'Invalid multi-value separator: {field}')
|
print(f'Invalid multi-value separator: {field}')
|
||||||
|
|
||||||
|
|
||||||
|
return field
|
||||||
|
Loading…
Reference in New Issue
Block a user