mirror of
https://github.com/ilri/csv-metadata-quality.git
synced 2025-05-10 15:16:01 +02:00
Add check for uncommon filenames
Generally we want people to upload documents in accessible formats like PDF, Word, Excel, and PowerPoint. This check warns if a file is using an uncommon extension.
This commit is contained in:
@ -86,6 +86,10 @@ def run(argv):
|
||||
if match is not None:
|
||||
df[column] = df[column].apply(check.date)
|
||||
|
||||
# Check: filename extension
|
||||
if column == 'filename':
|
||||
df[column] = df[column].apply(check.filename_extension)
|
||||
|
||||
# Write
|
||||
df.to_csv(args.output_file, index=False)
|
||||
|
||||
|
Reference in New Issue
Block a user