Skip to content

Commit dea9275

Browse files
authored
Merge pull request #202 from leaf-ai/nan_regions
#200 Fix filter on nan regions
2 parents c8dde11 + f9be24e commit dea9275

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

covid_xprize/scoring/predictor_scoring.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,13 @@ def load_dataset(url=LATEST_DATA_URL,
2424
# Keep only the fixed list of countries and regions
2525
geos_df = pd.read_csv(geos_file,
2626
encoding="ISO-8859-1")
27+
# Use '' instead of nan for region names
28+
latest_df["RegionName"] = latest_df["RegionName"].fillna("")
29+
geos_df["RegionName"] = geos_df["RegionName"].fillna("")
2730
countries = list(geos_df.CountryName.unique())
2831
regions = list(geos_df.RegionName.unique())
2932
latest_df = latest_df[(latest_df.CountryName.isin(countries)) &
3033
(latest_df.RegionName.isin(regions))]
31-
# Use '' instead of nan for region names
32-
latest_df["RegionName"] = latest_df["RegionName"].fillna("")
3334
return latest_df
3435

3536

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import sys
88
from setuptools import setup, find_packages
99

10-
LIBRARY_VERSION = '1.1.4'
10+
LIBRARY_VERSION = '1.1.5'
1111

1212
CURRENT_PYTHON = sys.version_info[:2]
1313
REQUIRED_PYTHON = (3, 6)

0 commit comments

Comments
 (0)