diff --git a/examples/IOC_data.ipynb b/examples/IOC_data.ipynb index 678c290..65d096e 100644 --- a/examples/IOC_data.ipynb +++ b/examples/IOC_data.ipynb @@ -119,7 +119,7 @@ }, "outputs": [], "source": [ - "east_stations[~east_stations.contacts.str.contains(\"NOAA\")]" + "east_stations[~east_stations.contacts.str.contains(\"NOAA\", na=False)]" ] }, { @@ -253,7 +253,7 @@ ], "metadata": { "kernelspec": { - "display_name": "python3", + "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, @@ -267,7 +267,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.16" + "version": "3.10.9" } }, "nbformat": 4, diff --git a/searvey/coops.py b/searvey/coops.py index b3034dd..f345a0a 100644 --- a/searvey/coops.py +++ b/searvey/coops.py @@ -821,10 +821,9 @@ def coops_stations_within_region( """ stations = coops_stations(station_status=station_status) - if region: + if region is not None: return stations[stations.within(region)] - else: - return stations + return stations def coops_stations_within_bounds( diff --git a/searvey/stations.py b/searvey/stations.py index faba4f1..1055bc1 100644 --- a/searvey/stations.py +++ b/searvey/stations.py @@ -51,6 +51,8 @@ def _get_ioc_stations( ioc_gdf = ioc.get_ioc_stations(region=region) # Normalize IOC + # Drop delay `NA'` : https://github.com/oceanmodeling/searvey/issues/91 + ioc_gdf = ioc_gdf[ioc_gdf.delay != "NA'"] # Convert delay to minutes ioc_gdf = ioc_gdf.assign( delay=pd.concat(