-
Notifications
You must be signed in to change notification settings - Fork 70
Open
Description
I have encountered an error while trying to load a shapefile with world coordinates "ne_110m_admin_0_countries.shp" and the corresponding .shx (v5.1.1). I followed the code in your 'obesity.ipnyb' file, which included the following code:
import geopandas as gpd
shapefile = 'countries_110m/ne_110m_admin_0_countries.shp'
gdf = gpd.read_file(shapefile)[['ADMIN', 'ADM0_A3', 'geometry']]
However, when I executed this code, I received the following error: "KeyError: "['ADMIN', 'ADM0_A3'] not in index".
I also tried loading shapefile v4.0.1, but encountered the same error.
When I loaded the file using the following code, it only contained the 'geometry' column:
gdf = gpd.read_file(shapefile)
gdf.head()
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels