1
0
mirror of https://github.com/ilri/csv-metadata-quality.git synced 2025-05-09 22:56:01 +02:00

csv_metadata_quality/check.py: update region output

Add the country to the message about missing regions. This makes it
easier to see which country is triggering the missing region error,
and helps in case of debugging possible mistakes in the data coming
from the country_converter library.
This commit is contained in:
2022-11-28 17:40:27 +03:00
parent 7097136b7e
commit 141b2e1da3

View File

@ -550,7 +550,7 @@ def countries_match_regions(row, exclude):
if un_region != "not found" and un_region not in regions:
print(
f"{Fore.YELLOW}Missing region ({un_region}): {Fore.RESET}{row[title_column_name]}"
f"{Fore.YELLOW}Missing region ({country} → {un_region}): {Fore.RESET}{row[title_column_name]}"
)
return