title: Complex Pandas Dataframe Manipulation
body: <p>I have a data frame that looks something like this:</p>
  
  <pre><code>import pandas as pd
  df= pd.DataFrame({'ID1':['A','B','C','D','E'],\
                    'ID2':['B','A','D','C','E'],\
                    'Account':['94000','94500','94000','18300','94500'],\
                    'Amount':[100,-100,50,-50,100],\
                    'Match':['-','-','-','-','-']})
  df
  </code></pre>
  
  <p>I am struggling with the most efficient way to identify when an item in 'ID1' is present in 'ID2' with a particular value of Account. For example, with a condition of Account=94500 should yield:</p>
  
  <pre><code>df= pd.DataFrame({'ID1':['A','B','C','D','E'],\
                    'ID2':['B','A','D','C','E'],\
                    'Account':['94000','94500','94000','18300','94500'],\            'Amount':[100,-100,50,-50,200],'Match':['True','-','-','-','-']})
  df
  </code></pre>
  
  <p>i.e. only the first row should be tagged because A (in ID2) matches Account 94500 </p>