title: Pandas: groupby and get index of first row matching condition
body: <p>I have a pandas <code>DataFrame</code> called <code>df</code>, sorted in chronological order. Each row is a visit on a website.</p>
  
  <p><code>df</code> has a column named <code>display</code> that indicates the number of times a specific page has been displayed during the visit. This column is populated by integers, 0 or greater.
  <code>df</code> also has a <code>user</code> column.</p>
  
  <p>I want to know how many times each user visited the site before ever seeing the business-critical page I'm interested in.</p>
  
  <p>To know that, I need a user-indexed <code>Series</code> populated as follows:</p>
  
  <ul>
  <li>0 if the user never displayed the page</li>
  <li>else, the number of rows (which is the number of visits) up to the first row where <code>display</code> is non-zero (meaning, the first visit where the user saw the page)</li>
  </ul>