diff --git a/salamanca/data.py b/salamanca/data.py index 53b9f80..7b8d89a 100644 --- a/salamanca/data.py +++ b/salamanca/data.py @@ -157,6 +157,9 @@ def query(self, indicator, tries=5, use_cache=True, overwrite=False, **kwargs): df['date'] = df['date'].astype(int) except: pass + # remove NaN countries + # TODO: why are there NaNs? + df = df.dropna(subset=['country']) # write to disc if we're caching if use_cache and (not exists or overwrite):