title: Pandas checking if values in multiple column exists in other columns
body: <p>I am trying to check if values for each row noted in Dataframe "Actual" match values under the same row in Dataframe "Estimate". Column position is not important. The value just needs to  exist on the same row level between the different dataframes. The Dataframes can be concat/ merged, if need be.
  I present below my code::</p>
  
  <pre><code>Actual=pd.DataFrame([[4,7,2,8,1],[1,5,7,9,8]], columns=['Actual1','Actual2','Actual3','Actual4','Actual5'])
  estimate=pd.DataFrame([[1,2,7,9,3],[0,8,2,5,9]], columns=['estimate1','estimate2','estimate3','estimate4','estimate5'])
  
  Actual
  
     Actual1  Actual2  Actual3  Actual4  Actual5
  0        4        7        2        8        1
  1        1        5        7        9        8
  
  estimate
  
     estimate1  estimate2  estimate3  estimate4  estimate5
  0          1          2          7          9          3
  1          0          8          2          5          9
  </code></pre>
  
  <p>My attempt using Pandas::</p>
  
  <pre><code>for loop1 in range(1,6,1):
      for loop2 in range(1,6,1):
          Actual['want'+str(loop1)]=np.where(Actual['Actual'+ str(loop1)] == estimate['estimate' + str(loop2)],1,0)
  </code></pre>
  
  <p>and finally, my output that I would like::</p>
  
  <pre><code>want=pd.DataFrame([[0,1,1,0,1],[0,1,0,1,1]], columns=['want1','want2','want3','want4','want5'])
  
  want
  
     want1  want2  want3  want4  want5
  0      0      1      1      0      1
  1      0      1      0      1      1
  </code></pre>
  
  <p>So, as I was mentioning earlier, since from Dataframe "Actual" value 4 does not exist on the whole first row of dataframe "estimate", column "want1" has been assigned value 0. Once again, considering the first row of Dataframe "Actual" column 5 where value=1, since this value exists in the same first row of dataframe "estimate" (column location does not matter) column 'want5' has been assigned value 1.</p>
  
  <p>Thanks.</p>