title: How to apply function to dataframe in place
body: <p>Is there a way I could use a scipy function like <a href="http://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.norm.html" rel="noreferrer"><code>norm.cdf</code></a> <strong>in place</strong> on a <code>numpy.array</code> (or <code>pandas.DataFrame</code>), using a variant of <code>numpy.apply</code>, <a href="http://docs.scipy.org/doc/numpy/reference/generated/numpy.apply_along_axis.html" rel="noreferrer"><code>numpy.apply_along_axs</code></a>, etc?</p>
  
  <hr>
  
  <p>The background is, I have a table of z-score values that I would like to convert to CDF values of the norm distribution. I'm currently using <a href="http://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.norm.html" rel="noreferrer"><code>norm.cdf</code></a> from <code>scipy</code> for this.</p>
  
  <p>I'm currently manipulating a dataframe that has non-numeric values.</p>
  
  <pre><code>      Name      Val1      Val2      Val3      Val4 
  0        A -1.540369 -0.077779  0.979606 -0.667112   
  1        B -0.787154  0.048412  0.775444 -0.510904   
  2        C -0.477234  0.414388  1.250544 -0.411658   
  3        D -1.430851  0.258759  1.247752 -0.883293   
  4        E -0.360181  0.485465  1.123589 -0.379157
  </code></pre>
  
  <p>(Making the <code>Name</code> variable an index is a solution, but in my actual dataset, the names are not alphabetical characters.)</p>
  
  <p>To modify only the numeric data, I'm using <a href="http://nullege.com/codes/search/pandas.DataFrame._data.get_numeric_data" rel="noreferrer"><code>df._get_numeric_data()</code></a> a private function that returns a dataframe containing a dataframe's numeric data. However, there is no <code>set</code> function. Hence, if I call</p>
  
  <pre><code>norm.cdf(df._get_numeric_data)
  </code></pre>
  
  <p>this won't change <code>df</code>'s original data.</p>
  
  <p>I'm trying to circumvent this by applying <code>norm.cdf</code> to the numeric dataframe <strong>inplace</strong>, so this changes my original dataset.</p>