title: Comparing pandas dataframes of different length
body: <p>I have two dataframes of different lengths both indexed by date. I need both dataframes to have the same dates, ie. delete the extra entries in the longest dataframe. </p>
  
  <p>I have found that I can reset index and make it another another column then call that column as a pandas dataseries and compare to the other data series, giving me a pandas series with only the entries that are also in the shorter dataframe: </p>
  
  <pre><code>df1 = ...
  df2 = ...
  dfadj = df1.reset_index(['Date'])
  dfstock = dfadj['Date'][dfadj['Date'].isin(dfindex['Date'])]
  </code></pre>
  
  <p>But then I would need to find the index positions from these values and in another step delete it from the longest dataframe. Am I missing a completely different approch which would be more logical and/or simple?</p>