title: Compare three dataframe and create a new column in one of the dataframe based on a condition
body: <p>I am comparing two data frames with master_df and create a new column based on a new condition if available.</p>
  <p>for example I have master_df and two region df as asia_df and europe_df. I want to check if company of master_df is available in any of the region data frames and create a new column as region as Europe and Asia</p>
  <pre><code>master_df
  company product
  ABC    Apple
  BCA    Mango
  DCA    Apple
  ERT    Mango
  NFT    Oranges
  
  europe_df
  account sales 
  ABC      12 
  BCA      13
  DCA      12
  
  asia_df
  account sales 
  DCA      15
  ERT      34
  </code></pre>
  <p>My final output dataframe is expected to be</p>
  <pre><code>company product region
  ABC    Apple    Europe
  BCA    Mango    Europe
  DCA    Apple    Europe
  DCA    Apple    Asia
  ERT    Mango    Asia
  NFT    Oranges  Others
  </code></pre>
  <p>When I try to merge and compare, some datas are removed. I need help on how to fix this issues</p>
  <pre><code>final_df = europe_df.merge(master_df, left_on='company', right_on='account', how='left').drop_duplicates()
  
  final1_df = asia_df.merge(master_df, left_on='company', right_on='account', how='left').drop_duplicates()
  
  
  final['region'] = np.where(final_df['account'] == final_df['company'] ,'Europe','Others')
  final['region'] = np.where(final1_df['account'] == final1_df['company'] ,'Asia','Others')
  </code></pre>