Reputation: 2312
I have a folder which contains the shape files; more formally, the files I have are: ".dbf", ".prj", ".shp" and ".shx". Right now, I read shape files through:
shapefile_path = r".\canada.shp"
canada = geopandas.read_file(shapefile_path)
But how about the other files?
Any help is much appreciated!!
Upvotes: 1
Views: 15155
Reputation: 7804
".dbf", ".prj", ".shp" and ".shx" are all parts of the same ShapeFile. For some reason, the structure of SHP is splitted into multiple files. If you read .shp into geopandas like you did above, it automatically reads the rest of them as well to give you proper GeoDataFrame composed of geometry, attributes and projection. You can see the details on what is the purpose of which filetype on Wiki.
Upvotes: 13