Skip to content

Commit

Permalink
specifying which regions table to use
Browse files Browse the repository at this point in the history
  • Loading branch information
spoonerf committed Sep 28, 2023
1 parent 631c4b0 commit 618dce6
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@


def _load_countries_regions() -> pd.DataFrame:
countries_regions = catalog.find("regions").load()
countries_regions = catalog.find("regions", namespace="regions").load()
return cast(pd.DataFrame, countries_regions)


Expand Down Expand Up @@ -87,10 +87,12 @@ def harmonize_countries(
warn_on_unknown_excluded_countries: bool = True,
show_full_warning: bool = True,
) -> pd.DataFrame:
"""Harmonize country names in dataframe, following the mapping given in a file.
"""Harmonize country names in dataframe, following the mapping given in a
file.
Countries in dataframe that are not in mapping will left unchanged (or converted to nan, if
make_missing_countries_nan is True). If excluded_countries_file is given, countries in that list will be removed
Countries in dataframe that are not in mapping will left unchanged (or
converted to nan, if make_missing_countries_nan is True). If
excluded_countries_file is given, countries in that list will be removed
from the output data.
Parameters
Expand Down

0 comments on commit 618dce6

Please sign in to comment.