Grouping dataframe based on similar column values : <pre><code>OFFENSE_ID    RULE_ID    STATUS  
       100          1      open
       101          2    closed
       102          2      open
       103          1      open
       104          2    closed
       105          2      open
</code></pre>

<p>Here's how I want it - </p>

<pre><code>RULE_ID   OPEN   CLOSED
      1      2        0
      2      2        2
</code></pre>

<p>Thank you in advance for any help!</p>
