1
0
mirror of https://github.com/ilri/csv-metadata-quality.git synced 2025-05-10 07:06:00 +02:00

Don't unnecessarily rewrite DataFrames for checks

By using df[column] = df[column].apply(check...) we were re-writing
the DataFrame every time we returned from a check. We don't actuall
y need to return a value at all, as the point of checks is to print
a warning to the screen. In Python a "return" statement without a v
ariable returns None.

I haven't measured the impact of this, but I assume it will mean we
are faster and use less memory.
This commit is contained in:
2021-03-16 16:04:19 +02:00
parent 9a5e3fd6ef
commit 330a7b7b9c
4 changed files with 32 additions and 32 deletions

View File

@ -94,4 +94,4 @@ def correct_language(row):
)
else:
return language
return