O'Reilly logo
  • QIAN Weishuo thinks this is interesting:

.apply(sorted, axis=1)

From

Cover of Pandas Cookbook

Note

把 SRC和DEST排序 这样,起点/终点对称总是被归一化