title: Getting mean, max, min from pandas dataframe
body: <p>I have the following dataframe which is the result of performing a standard pandas correlation:</p>
  
  <pre><code>df.corr()
  
             abc     xyz     jkl
  abc        1       0.2    -0.01
  xyz       -0.34    1       0.23
  jkl        0.5     0.4     1
  </code></pre>
  
  <p>I have a few things that need to be done with these correlations, however these calculations need to exclude all the cells where the value is 1. The 1 values are the cells where the item has a perfect correlation with itself, therefore I am not interested in it.:</p>
  
  <ul>
  <li><p>Determine the maximum correlation pair. The result is 'jkl' and 'abc' which has a correlation of 0.5</p></li>
  <li><p>Determine the minimum correlation pair. The result is 'abc' and 'xyz' which has a correlation of -0.34</p></li>
  <li><p>Determine the average/mean for the whole dataframe (again this needs to exclude all the values which are 1). The result would be (0.2 + -0.01 + -0.34 + 0.23 + 0.5 + 0.4) / 6 = 0,163333333</p></li>
  </ul>