mirror of
https://github.com/ilri/csv-metadata-quality.git
synced 2024-12-22 04:02:19 +01:00
Make output less debuggy
This commit is contained in:
parent
a849615b41
commit
c47c064a13
@ -10,8 +10,6 @@ def run():
|
||||
|
||||
# Fix whitespace in all columns
|
||||
for column in df.columns.values.tolist():
|
||||
print(f'DEBUG: {column}')
|
||||
|
||||
# Run whitespace fix on all columns
|
||||
df[column] = df[column].apply(fix.whitespace)
|
||||
|
||||
|
@ -24,7 +24,7 @@ def whitespace(field):
|
||||
match = re.findall(pattern, value)
|
||||
|
||||
if len(match) > 0:
|
||||
print('DEBUG: Excessive whitespace')
|
||||
print(f'Excessive whitespace: {value}')
|
||||
value = re.sub(pattern, ' ', value)
|
||||
|
||||
# Save cleaned value
|
||||
|
Loading…
Reference in New Issue
Block a user