I'm trying to vertically concatenate multiple shapefiles that reside in one directory, into one geodataframe. They all have the same table schema and same CRS. I am trying to use the code from this Stack Overflow post, but am getting an error 'WindowsPath' object has no attribute 'split'.
from pathlib import Path import geopandas as gpd import pandas as pd folder = Path("shp") gdf = pd.concat([ gpd.read_file(shp) for shp in folder.glob("*.shp") ## error message points to this line ### ]).pipe(gpd.GeoDataFrame)
I'm new to programming and have spent more time than I care to admit trying to figure this one out. I'm open to using alternative Python modules as long as it ends with a geodataframe.