title: Excel like formulas with pandas
body: <p>I have a pandas <code>DataFrame</code> with this format</p>
  
  <pre><code>User_id|2014-01|2014-02|2014-03|2014-04|2014-05|...|2014-12
  1      |   7   | NaN   | NaN   | NaN   | NaN   |...|  NaN
  2      | NaN   |   5   | NaN   | NaN   |   9   |...|  NaN
  3      |   2   |   4   | NaN   | NaN   | NaN   |...|  NaN
  </code></pre>
  
  <p>In words, the columns are months, the index is the <code>user_id</code> and each cell contains an integer number, or <code>NaN</code></p>
  
  <p>The numbers represents actions that were taken, and an action is considered successful if <code>3</code> months after it, no other action was needed.</p>
  
  <p><em>My goal is to find the list of successful actions</em></p>
  
  <p>In Excel, I'd write a formula like this:</p>
  
  <pre><code>Sheet2!E5=AND(Sheet1!E5&lt;&gt;"NaN",Sheet1!D5="NaN",Sheet1!C5="NaN",Sheet1!B5="NaN")
  </code></pre>
  
  <p>And would drag it to the rest of the columns, and then I would have an indicator whether an action was successful.</p>
  
  <p>How can this be done efficiently with pandas ?</p>
  
  <p><strong>Sample output:</strong></p>
  
  <p>For the example given above, the desired output should be:</p>
  
  <pre><code>User_id|2014-01|2014-02|2014-03|2014-04|2014-05|
  1      |   T   |   F   |   F   |   F   |   F   |
  2      |   F   |   F   |   F   |   F   |   ?   |
  3      |   F   |   T   |   F   |   F   |   F   |
  </code></pre>