title: Pandas create funneling based on user activity
body: <p>I have this dataframe</p>
  
  <pre><code>user    created_at                    session_count     event_name
  Alpha   2019-11-01 07:00:00+07:00     1                 A
  Alpha   2019-11-01 07:00:01+07:00     1                 B
  Alpha   2019-11-01 07:00:02+07:00     1                 C
  Alpha   2019-11-01 07:00:03+07:00     2                 A
  Alpha   2019-11-01 07:00:04+07:00     2                 C
  Beta    2019-11-02 07:00:00+07:00     1                 A
  Beta    2019-11-02 07:00:01+07:00     1                 B
  Beta    2019-11-02 07:00:02+07:00     2                 D
  Beta    2019-11-02 07:00:03+07:00     2                 C
  Beta    2019-11-02 07:00:04+07:00     2                 E
  ...     ...                           ...               ...
  </code></pre>
  
  <p>The event name can be A to Z.</p>
  
  <p>I want to make funneling like google analytics of user activity in same session but I have no idea how to do it. what in my mind is the function that has 1-4 parameters of an event that count unique user for example <code>funnel(A, B, C, D)</code></p>
  
  <p>and the result is</p>
  
  <pre><code>A    B    C    D
  2    2    1    0
  </code></pre>
  
  <p>or <code>funnel(D, C, NULL, NULL)</code></p>
  
  <pre><code>D    C
  1    1 
  </code></pre>
  
  <p>Feel free if you have better solution than me</p>