CityA | CityB | Distance | |
1 | New York | Los Angeles | 2789 |
2 | Chicago | Houston | 1082 |
3 | Las Vegas | Los Angeles | 270 |
4 | Los Angeles | New York | 2789 |
Btw, since there are many city pairs that share the same distance in my dataset, so it is not convenient to sort by Distance then drop if _n != 1.
It looks like a simple question but it really took me a lot of time...
Many thanks in advance!
0 Response to Dropping duplicated pairs of two variables
Post a Comment