title: How to merge two rows in a dataframe pandas
body: <p>I have a dataframe with two rows and I'd like to merge the two rows to one row. 
  The df Looks as follows:</p>
  
  <pre><code>              PC           Rating CY   Rating PY    HT
  0             DE101           NaN            AA     GV
  0             DE101           AA+           NaN     GV
  </code></pre>
  
  <p>I have tried to create two seperate dataframes and Combine them with df.merge(df2) without success. The result should be the following</p>
  
  <pre><code>              PC           Rating CY   Rating PY    HT
  0             DE101           AA+            AA     GV
  </code></pre>
  
  <p>Any ideas? Thanks in advance
  Could df.update be a possible solution?</p>
  
  <p>EDIT:</p>
  
  <pre><code>df.head(1).combine_first(df.tail(1))
  </code></pre>
  
  <p>This works for the example above. However, for columns containing numerical values, this approach doesn't yield the desired output, e.g. for</p>
  
  <pre><code>              PC           Rating CY   Rating PY    HT    MV1   MV2
  0             DE101           NaN            AA     GV    0     20 
  0             DE101           AA+           NaN     GV    10    0
  </code></pre>
  
  <p>The output should be:</p>
  
  <pre><code>              PC           Rating CY   Rating PY    HT   MV1    MV2
  0             DE101           AA+            AA     GV   10     20
  </code></pre>
  
  <p>The formula above doesn't sum up the values in the last two columns, but takes the values in the first row of the dataframe.</p>
  
  <pre><code>              PC           Rating CY   Rating PY    HT   MV1    MV2
  0             DE101           AA+            AA     GV   0     20
  </code></pre>
  
  <p>How could this problem be fixed?</p>