title: How to print a groupby object
body: <p>I want to print the result of grouping with Pandas.</p>
  
  <p>I have a dataframe:</p>
  
  <pre><code>import pandas as pd
  df = pd.DataFrame({'A': ['one', 'one', 'two', 'three', 'three', 'one'], 'B': range(6)})
  print(df)
  
         A  B
  0    one  0
  1    one  1
  2    two  2
  3  three  3
  4  three  4
  5    one  5
  </code></pre>
  
  <p>When printing after grouping by 'A' I have the following:</p>
  
  <pre><code>print(df.groupby('A'))
  
  &lt;pandas.core.groupby.DataFrameGroupBy object at 0x05416E90&gt;
  </code></pre>
  
  <p>How can I print the dataframe grouped?</p>
  
  <p>If I do:</p>
  
  <pre><code>print(df.groupby('A').head())
  </code></pre>
  
  <p>I obtain the dataframe as if it was not grouped:</p>
  
  <pre><code>             A  B
  A                
  one   0    one  0
        1    one  1
  two   2    two  2
  three 3  three  3
        4  three  4
  one   5    one  5
  </code></pre>
  
  <p>I was expecting something like:</p>
  
  <pre><code>             A  B
  A                
  one   0    one  0
        1    one  1
        5    one  5
  two   2    two  2
  three 3  three  3
        4  three  4
  </code></pre>