mirror of
https://github.com/ilri/csv-metadata-quality.git
synced 2025-07-01 04:01:53 +02:00
Compare commits
2 Commits
b9c44aed7d
...
0cf0bc97f0
Author | SHA1 | Date | |
---|---|---|---|
0cf0bc97f0
|
|||
40c3585bab
|
@ -361,10 +361,11 @@ def countries_match_regions(row):
|
|||||||
)
|
)
|
||||||
|
|
||||||
# Add the missing regions back to the row, paying attention to whether
|
# Add the missing regions back to the row, paying attention to whether
|
||||||
# or not the row's regions are blank or not.
|
# or not the row's region column is None (aka null) or just an empty
|
||||||
if row[region_column_name] is not None:
|
# string (length would be 0).
|
||||||
row[region_column_name] = row[region_column_name] + "||".join(
|
if row[region_column_name] is not None and len(row[region_column_name]) > 0:
|
||||||
missing_regions
|
row[region_column_name] = (
|
||||||
|
row[region_column_name] + "||" + "||".join(missing_regions)
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
row[region_column_name] = "||".join(missing_regions)
|
row[region_column_name] = "||".join(missing_regions)
|
||||||
|
Reference in New Issue
Block a user