I have two dataframes which consists of a list of coordinates and a few unique identifiers that are the same between both dataframes [Attached pictures]. So I am trying to measure the shortest/minimum distance between IDs of df1 with points of df2. The script I have written currently takes into consideration the same ID in df2; meaning, for instance, looking at df1 (which i deemed it the reference point dataframe) ID 1, I want it to consider all other points excluding itself (ID 1) in df2 to calculate the shortest distance and hence, same concept with all the other unique identifiers. It should end up with only 3 values. I was thinking a loop and a nested if statement would do but this does not seem to be working. Any help on this would be great! Thank you!
Aucun commentaire:
Enregistrer un commentaire