📜  如何查找 df 的哪 2 行最相似 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:46.452000             🧑  作者: Mango

代码示例1
import scipy
ary = scipy.spatial.distance.cdist(df2, df1, metric='euclidean')
df2[ary==ary.min()]
Out[894]: 
     A   B   C   D
14  16  66  83  13