I have two pandas dataframes d1
and d2
that look like these:
d1
looks like:
output value1 value2 value2
1 100 103 87
1 201 97.5 88.9
1 144 54 85
d2
looks like:
output value1 value2 value2
0 100 103 87
0 201 97.5 88.9
0 144 54 85
0 100 103 87
0 201 97.5 88.9
0 144 54 85
The column output has a value of 1 for all rows in d1 and 0 for all rows in d2. It's a grouping variable. I need to find euclidean distance between each rows of d1 and d2 (not within d1 or d2). If d1
has m
rows and d2
has n
rows, then the distance matrix will have m
rows and n columns
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…