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:
@ -94,4 +94,4 @@ def correct_language(row):
|
||||
)
|
||||
|
||||
else:
|
||||
return language
|
||||
return
|
||||
|
Reference in New Issue
Block a user