diff --git a/scripts/generate_pages.py b/scripts/generate_pages.py index 2f3ced7..2dde6a6 100644 --- a/scripts/generate_pages.py +++ b/scripts/generate_pages.py @@ -165,4 +165,13 @@ def clean_date(x): # Convert country code column to a link pointing to the country-specific page country_data["Country"] = country_data["Country"].apply( - lambda code: f'{code}' + if pd.notna(code) else code + ) + + # Now, write the country data to the HTML file + cf.write(country_data.to_html(index=False, escape=False, classes="unlocode-table")) + cf.write(footer_template) # Footer for the country-specific page + + f.write("") + f.write(footer_template) # Footer for the UNLOCODE directory page \ No newline at end of file