Skip to content

Commit 8bd4722

Browse files
author
Sarthak Khanna
committed
Update geopandas example to support versions >=1.0 (fixes issue plotly#4778)
1 parent b509b4a commit 8bd4722

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doc/python/scatter-plots-on-maps.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,10 @@ import plotly.express as px
7575
import geopandas as gpd
7676

7777
if gpd.__version__ < '1.0':
78-
geo_df = gpd.read_file(gpd.datasets.get_path('naturalearth_cities'))
78+
df = gpd.read_file(gpd.datasets.get_path('naturalearth_cities'))
7979
else:
8080
import geodatasets
81-
geo_df = gpd.read_file(geodatasets.get_path('naturalearth_cities'))
81+
df = gpd.read_file(geodatasets.get_path('naturalearth_cities'))
8282

8383
px.set_mapbox_access_token(open(".mapbox_token").read())
8484
fig = px.scatter_geo(geo_df,

0 commit comments

Comments
 (0)