From d6f32eb976966fe51dc5e9fbd828180b30582d05 Mon Sep 17 00:00:00 2001 From: Sander Roosendaal Date: Sun, 24 Sep 2017 09:57:38 +0200 Subject: [PATCH] fixed nan coordinates in maps --- rowers/interactiveplots.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rowers/interactiveplots.py b/rowers/interactiveplots.py index 989e4401..aacb2ab2 100644 --- a/rowers/interactiveplots.py +++ b/rowers/interactiveplots.py @@ -820,6 +820,8 @@ def leaflet_chart2(lat,lon,name=""): df = df.replace(0,np.nan) df = df.loc[(df!=0).any(axis=1)] + df.fillna(method='bfill',axis=0,inplace=True) + df.fillna(method='ffill',axis=0,inplace=True) lat = df['lat'] lon = df['lon'] if lat.empty or lon.empty: