title: Normalize data in pandas
body: <p>Suppose I have a pandas data frame <code>df</code>: </p>
  
  <p>I want to calculate the column wise mean of a data frame.</p>
  
  <p>This is easy: </p>
  
  <pre><code>df.apply(average) 
  </code></pre>
  
  <p>then the column wise range max(col) - min(col). This is easy again: </p>
  
  <pre><code>df.apply(max) - df.apply(min)
  </code></pre>
  
  <p>Now for each element I want to subtract its column's mean and divide by its column's range. I am not sure how to do that</p>
  
  <p>Any help/pointers are much appreciated. </p>