I have two dataframes with the same size, 100 rows in both dataframe. I want to calculate the Euclidean distance between the two dataframes. and return the results "the distance" in another dataframe.
For example, calculate the Euclidean distance between the first row in df1 to the the first row in df2, and then calculate the distance between the second row in df1 to the the second row in df2, and so on.
I tried this
ary = scipy.spatial.distance.cdist(df1, df2, metric='euclidean')
It gave me all distances between the two dataframe. But what I need is to find the distance between the 1st row in df1 and 1st row in df2, and so on.