I have a pandas dataframe with six columns, first three columns contain x, y and z reference coordinate, and the next three - coordinates of some
You might not need any fancy magic here:
df['dist'] = np.sqrt( (df.x1-df.x2)**2 + (df.y1-df.y2)**2 + (df.z1-df.z2)**2)