I have these shapefiles:
q=gpd.read_file(a.shp)
df=gpd.read_file(b.shp)
final = pd.merge(df, q, on=['FID_buffer'], how='inner')
#out= a certain directory
final.to_file(out)
AttributeError: 'DataFrame' object has no attribute 'to_file'
I want after the join to export it back as shp
I tried with spatial join in geopandas but it said something with crs was wrong that's why I did with pandas but I can't export it.
final = gpd.sjoin(df, q, how="inner", op='intersects')
which gives:
AttributeError: 'DataFrame' object has no attribute 'crs'
GeoDataFrame(final, geometry='name_of_geometry_name')