title: Pandas merge error: cannot reindex from a duplicate axis
body: <p>I recently asked a question
  <a href="https://stackoverflow.com/questions/41255278/merge-pandas-dataframe-on-time-and-another-column">Merge pandas dataframe on time and another column</a>
  about merging dataframes and got a superb, one-line, answer that worked perfectly with my test data.  However, when I tried to put it into my actual data I got the following error:</p>
  
  <p><code>cannot reindex from a duplicate axis</code></p>
  
  <p>Here's some of the code from that question (with a minor change to show overlapping timestamps):</p>
  
  <pre><code>a = {'date':['1/1/2015 00:00','1/1/2015 00:15','1/1/2015 00:30'], 'num':[1,2,3]}
  b = {'date':['1/1/2015 00:15','1/1/2015 00:30','1/1/2015 00:45'], 'num':[4,5,6]}
  
  dfa = pd.DataFrame(a)
  dfb = pd.DataFrame(b)
  
  dfa['date'] = dfa['date'].apply(pd.to_datetime)
  dfb['date'] = dfb['date'].apply(pd.to_datetime)
  </code></pre>
  
  <p>and the solution:</p>
  
  <pre><code>dfa.set_index('date').combine_first(dfb.set_index('date')).asfreq('15T').reset_index()
  </code></pre>
  
  <p>The above code (with simple data) works like a charm, but if anyone knows what might be going wrong with my code in production, please let me know.  Thanks.</p>
  
  <p>And yes, there are similar questions on SO, but I haven't found any that deal with the fact that there will inherently be duplicates in the indices and I want one to overwrite the other.</p>