title: Formatting pandas pivot_table
body: <p>I'm trying to copy a pivot table in excel in python using the pandas <code>pivot_table</code> function, I'm having trouble with the output.  Basically, one of my rows is a long string and when outputting to the console I just get summary information.</p>
  
  <p>I have set the following options:</p>
  
  <pre><code>pd.set_printoptions(max_rows=200, max_columns=100)
  pd.set_option('display.precision',2)
  </code></pre>
  
  <p>Something like this works:</p>
  
  <pre><code>df.pivot_table(['xx','yy'], rows=['Page'], cols=['Variant'], aggfunc='sum')
  </code></pre>
  
  <p>but  this doesn't:</p>
  
  <pre><code>df.pivot_table(['xx','yy'], rows=['Page','long string'], cols=['Variant'], aggfunc='sum')
  </code></pre>
  
  <p>The former ouputs a pivot table as expected but this is the output for the latter:</p>
  
  <pre><code>In [11]: test
  Out[11]: 
  &lt;class 'pandas.core.frame.DataFrame'&gt;
  MultiIndex: 4 entries, (avip, Text Ads on AVIP) to (srp/browse, Search/Browse below results set)
  Data columns (total 4 columns):
  Control 1         4  non-null values
  Control 2         4  non-null values
  Test Variant 1    4  non-null values
  Test Variant 2    4  non-null values
  dtypes: int64(4) 
  </code></pre>
  
  <p>here is a simple example</p>
  
  <p>row1       row2                       data</p>
  
  <p>xx         "very long string"          123</p>
  
  <p>yy         "very long string very"      456</p>
  
  <p>zz         "very long string very"      789</p>
  
  <p>when i group by row1 the output is fine, when i group by row1 and row2 is where i have trouble with the output</p>