I'm trying to combine multiple shapefiles by implementing the follwing:
import geopandas as gpd
import pandas as pd
for i in range(10,56):
interesting_files = "/Users/m3105/Downloads/area/tl_2015_{}_arealm.shp".format(i)
gdf_list = []
for filename in sorted(interesting_files):
gdf_list.append(gpd.read_file((filename)))
full_gdf = pd.concat(gdf_list)
in which the directory /Users/m3105/Downloads/area
has several shapefiles with such as tl_2015_01_arealm.shp
, tl_2015_02_arealm.shp
all the way up to tl_2015_56_arealm.shp
. I'd like to combine all of these shapefiles and avoid repeating their headers. However, whenever I try concating the files using the code above, I get the following error:
ValueError: Null layer: u''
Normally, I'd know how to concat csv files together but I'm note sure how to concat shapefiles. I'd greatly appreciate any help