title: Python iterating rows and matching values
body: <p>I need to a result column in df1, when </p>
  
  <p>Condition 1 : Values of each row in Column1 of df1 match with that of Column1 of df2 (if its true it should move to condition2) e.g A1 of df1 should match with A1 of df2 and similarly for A2 and so on. </p>
  
  <p>Condition 2 : If the first condition is true it should also match second column. B2(df1) should be equal to B2(df2). </p>
  
  <p>The result column is in df1. and return "match" or "do not match" in respective row when both conditions are true. </p>
  
  <p>I have tried the below code but it matches the whole column instead of row by row. (I assume)  </p>
  
  <pre><code>import pandas as pd 
  #reading data
  df1 = pd.read_excel("Book1.xlsx")
  df2 = pd.read_excel("Book2.xlsx")
  c1 = df1['EFE'] == df2['EFE'] #EFE IS COLUMN 1
  c2 = df1['DOR'] == df2['DOR'] #DOR IS COLUMN 2
  #Giving No error but result is not as desired. Each EFE is marked not good
  if c1 is True and c2 is True:
     df1['Result'] = "Good"
  else:
     df1['Result'] = "Not Good"
  
  </code></pre>
  
  <p>Code is edited. to update the latest changes. </p>