title: Apply np.subtract to row in pandas skipping nan
body: <p>I am trying to create a function to operate with basic operations between 2 columns.</p>
  
  <p>So i defined some lambda functions to apply to the dataframes</p>
  
  <pre><code>addi=lambda x: np.round(x.sum(),2)
  subt=lambda x: np.round(np.subtract.reduce(x.values),2)
  prod=lambda x: np.round(x.prod(),2)
  divi=lambda x: np.round(np.divide.reduce(x.values),2)
  </code></pre>
  
  <p>In df a new column is created with the result of the operation. Example</p>
  
  <pre><code>co = self.df.columns[cn]#columns names
  df[new_name] = self.df.loc[:, co].apply(subt,axis=1)
  </code></pre>
  
  <p>There is GUI to select the operation </p>
  
  <p>The thing is that the nan values are not filter out for the subtraction and division, and this may lead to nan values.</p>
  
  <p>I tried to modified this by</p>
  
  <pre><code>subt=lambda x: np.round(np.subtract.reduce(np.ma.masked_array(x.values,mask=[np.isnan(x.values)])),2)
  </code></pre>
  
  <p>but i got this error</p>
  
  <pre><code>AttributeError: ("'numpy.float64' object has no attribute '_mask'", u'occurred at index 2010-01-27 15:50:00')
  </code></pre>