title: Find first true value in a row of Pandas dataframe
body: <p>I have two dataframes of boolean values. </p>
  
  <p>The first one looks like this:</p>
  
  <pre><code>b1=pd.DataFrame([[ True, False, False, False, False],
         [False, False,  True, False, False],
         [False,  True, False, False, False],
         [False, False, False, False, False]])
  
  b1
  Out[88]: 
         0      1      2      3      4
  0   True  False  False  False  False
  1  False  False   True  False  False
  2  False   True  False  False  False
  3  False  False  False  False  False
  </code></pre>
  
  <p>If I am just interested in whether each row has any True value I can use the <code>any</code> method:</p>
  
  <pre><code>b1.any(1)
  Out[89]: 
  0    True
  1    True
  2    True
  3    False
  dtype: bool
  </code></pre>
  
  <p>However, I want to have an added constraint based on a second dataframe that looks like the following:</p>
  
  <pre><code>b2 = pd.DataFrame([[ True, False,  True, False, False],
         [False, False,  True,  True,  True],
         [ True,  True, False, False, False],
         [ True,  True,  True, False, False]])
  
  b2
  Out[91]: 
         0      1      2      3      4
  0   True  False   True  False  False
  1  False  False   True   True   True
  2   True   True  False  False  False
  3   True   True   True  False  False
  </code></pre>
  
  <p>I want to identify rows that have a True value in the first dataframe ONLY if it is the first True value in a row of the second dataframe. </p>
  
  <p>For example, this would exclude row 2 because although it has a True value in the first dataframe, it is the 2nd true value in the second dataframe. In contrast, rows 1 and 2 have a true value in dataframe 1 that is also the first true value in dataframe 2. The output should be the following:</p>
  
  <pre><code>0    True
  1    True
  2    False
  3    False
  dtype: bool
  </code></pre>