title: Merging and subtracting DataFrame columns in pandas?
body: <p>I have a pandas DataFrame, something like:</p>
  
  <pre><code>col1  col2 col3 col5
  NaN    1    2    8
  2     NaN   4    8
  4     NaN   4    8
  </code></pre>
  
  <p>I want to do two things:</p>
  
  <p>1) Merge columns 1 and 2:</p>
  
  <pre><code>newcol1 col3 col5
  1       2    8
  2       4    8
  4       4    8
  </code></pre>
  
  <p>I have tried using .concat, but that just concatenates the rows. Doesn't seem like I can use standard <code>+</code> operators with NaN values.</p>
  
  <p>2) Subtract column 5 from new column 1 and column 3, so I end up with:</p>
  
  <pre><code>newcol1    col3
  -7         -6
  -6         -4
  -4         -4
  </code></pre>
  
  <p>Tried doing it this way:</p>
  
  <pre><code>dataframe[['newcol1', 'col2']] - dataframe['col5']
  </code></pre>
  
  <p>and</p>
  
  <pre><code>dataframe[['newcol1', 'col2']].subtract(dataframe['col5'])
  </code></pre>
  
  <p>but neither works.</p>