From 8bd4722ce5bba59fde12b186235215a48eaeab66 Mon Sep 17 00:00:00 2001 From: Sarthak Khanna Date: Mon, 7 Oct 2024 16:22:41 +0200 Subject: [PATCH] Update geopandas example to support versions >=1.0 (fixes issue #4778) --- doc/python/scatter-plots-on-maps.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/python/scatter-plots-on-maps.md b/doc/python/scatter-plots-on-maps.md index e6e0d8546dc..b45a9e0d147 100644 --- a/doc/python/scatter-plots-on-maps.md +++ b/doc/python/scatter-plots-on-maps.md @@ -75,10 +75,10 @@ import plotly.express as px import geopandas as gpd if gpd.__version__ < '1.0': - geo_df = gpd.read_file(gpd.datasets.get_path('naturalearth_cities')) + df = gpd.read_file(gpd.datasets.get_path('naturalearth_cities')) else: import geodatasets - geo_df = gpd.read_file(geodatasets.get_path('naturalearth_cities')) + df = gpd.read_file(geodatasets.get_path('naturalearth_cities')) px.set_mapbox_access_token(open(".mapbox_token").read()) fig = px.scatter_geo(geo_df,