title: Column operations on pandas groupby object
body: <p>I have a dataframe <code>df</code> that looks like this:</p>
  
  <pre><code>     id   Category   Time
  1    176       12      00:00:00
  2    4956      2       00:00:00
  3    583       4       00:00:04
  4    9395      2       00:00:24
  5    176       12      00:03:23
  </code></pre>
  
  <p>which is basically a set of <code>id</code> and the <code>category</code> of item they used at a particular <code>Time</code>. I use <code>df.groupby['id']</code> and then I want to see if they used the same category or different and assign True or False respectively (or <code>NaN</code> if that was the first item for that particular <code>id</code>. I also filtered out the data to remove all the <code>id</code>s with only one <code>Time</code>. </p>
  
  <p>For example one of the groups may look like</p>
  
  <pre><code>      id   Category   Time
  1    176       12      00:00:00
  2    176       12      00:03:23
  3    176       2       00:04:34
  4    176       2       00:04:54
  5    176       2       00:05:23
  </code></pre>
  
  <p>and I want to perform an operation to get</p>
  
  <pre><code>      id   Category   Time          Transition
  1    176       12      00:00:00       NaN
  2    176       12      00:03:23       False
  3    176       2       00:04:34       True
  4    176       2       00:04:54       False
  5    176       2       00:05:23       False
  </code></pre>
  
  <p>I thought about doing an <code>apply</code> of some sorts to the <code>Category</code> column after <code>groupby</code> but I am having trouble figuring out the right function.</p>