title: Replacing Rows in Pandas DataFrame with Other DataFrame Based on Index
body: <p>I have 2 dataFrames</p>
  
  <pre><code>df1
      B   C
  A       
  0   300 6
  1   400 7
  2   500 8
  3   600 9
  
  df2
      B   C
  A       
  2   433 99
  3   555 99
  </code></pre>
  
  <p>This is how I construct them:</p>
  
  <pre><code>df1 = pd.DataFrame({'A': [0, 1, 2, 3],
                     'B': [300, 400, 500, 600], 
                     'C': [6, 7, 8, 9]})
  df1.set_index('A', inplace=True)
  df2 = pd.DataFrame({'A': [2, 3],
                      'B': [433, 555],
                      'C': [99, 99]})
  df2.set_index('A', inplace=True)
  </code></pre>
  
  <p>I want to replace all rows from <code>df1</code> with the rows from <code>df2</code> based on the index, the result should look like this:</p>
  
  <pre><code>df_result
      B   C
  A       
  0   300 6
  1   400 7
  2   433 99
  3   555 99
  </code></pre>
  
  <p>What is the most elegant way to do this?</p>