title: Calculating pairwise Euclidean distance between all the rows of a dataframe
body: <p>How can I calculate the Euclidean distance between all the rows of a dataframe? I am trying this code, but it is not working:</p>
  
  <pre><code>zero_data = data
  distance = lambda column1, column2: pd.np.linalg.norm(column1 - column2)
  result = zero_data.apply(lambda col1: zero_data.apply(lambda col2: distance(col1, col2)))
  result.head()
  </code></pre>
  
  <p>This is how my (44062 by 278) dataframe looks like:</p>
  
  <p><a href="https://i.stack.imgur.com/PebHB.png" rel="noreferrer"><img src="https://i.stack.imgur.com/PebHB.png" alt="Please see sample data here"></a></p>