title: Merge two data frames based on common column values in Pandas
body: <p>How to get merged data frame from two data frames having common column value such that only those rows make merged data frame having common value in a particular column. </p>
  
  <p>I have 5000 rows of <code>df1</code> as format : -</p>
  
  <pre><code>    director_name   actor_1_name    actor_2_name    actor_3_name    movie_title
  0   James Cameron   CCH Pounder Joel David Moore    Wes Studi     Avatar
  1   Gore Verbinski  Johnny Depp Orlando Bloom   Jack Davenport   Pirates 
      of the Caribbean: At World's End
  2   Sam Mendes   Christoph Waltz    Rory Kinnear    Stephanie Sigman Spectre
  </code></pre>
  
  <p>and 10000 rows of <code>df2</code> as</p>
  
  <pre><code>movieId                   genres                        movie_title
      1       Adventure|Animation|Children|Comedy|Fantasy   Toy Story
      2       Adventure|Children|Fantasy                    Jumanji
      3       Comedy|Romance                             Grumpier Old Men
      4       Comedy|Drama|Romance                      Waiting to Exhale
  </code></pre>
  
  <p>A common column 'movie_title' have common values and based on them, I want to get all rows where 'movie_title' is same. Other rows to be deleted.</p>
  
  <p>Any help/suggestion would be appreciated. </p>
  
  <p>Note:  I already tried </p>
  
  <pre><code>pd.merge(dfinal, df1, on='movie_title')
  </code></pre>
  
  <p>and output comes like one row </p>
  
  <pre><code>director_name   actor_1_name    actor_2_name    actor_3_name    movie_title movieId title   genres
  </code></pre>
  
  <p>and on how ="outer"/"left", "right", I tried all and didn't get any row after dropping NaN although many common coloumn do exist.</p>