From e35bdd5cc1f5bcfceee9eea52f0131f7a4477dbb Mon Sep 17 00:00:00 2001 From: remi-sap Date: Mon, 28 Mar 2022 16:02:21 +0200 Subject: [PATCH] Fix for issue 1758 add_data with GeoDataFrame should work regardless of the name of the geometry column --- bindings/kepler.gl-jupyter/keplergl/keplergl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bindings/kepler.gl-jupyter/keplergl/keplergl.py b/bindings/kepler.gl-jupyter/keplergl/keplergl.py index be2f8a26db..f40d321deb 100644 --- a/bindings/kepler.gl-jupyter/keplergl/keplergl.py +++ b/bindings/kepler.gl-jupyter/keplergl/keplergl.py @@ -41,7 +41,7 @@ def _gdf_to_dict(gdf): # convert geodataframe to dataframe df = pd.DataFrame(gdf) # convert geometry to wkt - df[name] = df.geometry.apply(lambda x: shapely.wkt.dumps(x)) + df[name] = gdf.geometry.apply(lambda x: shapely.wkt.dumps(x)) return _df_to_dict(df)