I have a pandas DataFrame 'df' containing about 106 rows. Now I want to execute the following code:
c = []
for ind, a in df.iterrows():
for ind, b in df.iterrows():
if a.hit_id < b.hit_id and a.layer_id != b.layer_id :
c.append(dist(a, b))
c = numpy.array(c)
What is the most efficient way of doing this?