title: Pandas stacked bar chart
body: <p>I have the following dataset:</p>
  
  <pre><code>SessionId    Query
     1           a   
     1           b
     2           a
     3           b
     3           b
     3           c
     3           a
  </code></pre>
  
  <p>I want to display a stacked bar chart where there will be a bar for each <em>Session</em> and the bar will consist of different colors for each <em>Query</em> that it has, the stacked size will be in the size of the number of queries in each session.</p>
  
  <p>I tried something like this:</p>
  
  <pre><code>result = data.groupby('SessionId').apply(
     lambda group: (
        group.groupby('Query').apply(
           lambda queryGroup: (
              queryGroup.count()
           )                
        )
     )
   ) 
  </code></pre>
  
  <p>But it gives a weird table inside a table</p>