I have two GeoDataframes (gdf_1 and gdf_2). Both of these GeoDataframes have a UID.
I'm trying to use sjoin_nearest from geopandas to find the nearest point from gdf_2 for each point from gdf_1, but only look at those points from gdf_2 where the UID (minus the last n characters) equals the UID of the comparison point from gdf_1.
If there are no points with an equal UID in gdf_2 the point can be dropped from the GeoDataframe.
Is there any simple solution to this problem ?