The distance calculation function you seem to be looking for is the following:
https://scikit-learn.org/stable/modules/generated/sklearn.metrics.pairwise_distances.html
You can set the metric to be any of the ones used for scipy.spatial.distance.pdist.
Example of how it would work:
a = [[1,2,3,4,5,6,7,8,10]]
b = [[2,4,1,3,4,5,6,7,8]]
c = [[4,2,1,54,7,85,89,1,2]]
from sklearn.metrics import pairwise_distances
pairwise_distances(a,b)
The output would be:
array([[4.24264069]])
Similary, the output for
pairwise_distances(a,c)
would be:
array([[124.87994234]])
Hence, c is further away from a.
You can use this logic in your problem. In your case, the following code snippet would do the trick:
import pandas as pd
import numpy as np
df = pd.read_csv('your_file.csv')
for i, row in df.iterrows():
row = np.array(row)
for j, other_row in df.iterrows():
other_row = np.array(other_row)
distance = pairwise_distances(np.reshape(row,(1,len(row))),np.reshape(other_row,(1,len(other_row))))
print("Distance between row {} and {} : {}".format(i,j,distance))