title: pandas combine_first with particular index columns?
body: <p>I'm trying to join two dataframes in pandas to have the following behavior: I want to join on a specified column, but have it so redundant columns are not added to the dataframe. This is analogous to <code>combine_first</code> except <code>combine_first</code> does not seem to take an index column optional argument. Example:</p>
  
  <pre><code># combine df1 and df2 based on "id" column
  df1 = pandas.merge(df2, how="outer", on=["id"])
  </code></pre>
  
  <p>The problem with the above is that columns common to df1/df2 aside from "id" will be added twice (with <code>_x,_y</code> prefixes) to df1. How can I do something like:</p>
  
  <pre><code># Do outer join from df2 to df1, matching items by "id" but not adding
  # columns that are redundant (df1 takes precedence if the values disagree)
  df1.combine_first(df2, on=["id"])
  </code></pre>
  
  <p>How can this be done?</p>