title: Pandas groupby output to Excel using xlsxwriter
body: <p>Following on from an earlier question, I am trying to output some mean values calculated from a <code>groupby function</code> on a pandas <code>DataFrame</code>.  I have seen a lot of examples for writing whole <code>DataFrames</code> to an excel but I haven't found examles of writing a single pandas mean output to excel having run a <code>groupby</code> or even a describe function on a <code>dataframe</code></p>
  
  <p>My current <code>groupby function</code> is the following:</p>
  
  <pre><code>DF[(DF['Iteration'] == CURRENTLOG_ID) &amp; (DF['Feature Enabled'] == 1)].groupby([’Feature Active'])[['Value1','Value2']].mean()
  </code></pre>
  
  <p>And I would then print to screen using:</p>
  
  <pre><code>print np.round(FeatureON, decimals=1)
  </code></pre>
  
  <p>This would output the following to <code>cmd window</code> ...                                   </p>
  
  <pre><code>                                Value1   Value2
  Feature Enabled    Iteration
  1                  Iteration_1  -1276.3  -1302.9
  </code></pre>
  
  <p>I just wanted to know if there is a simple way of writing the mean outputs <code>-1276.3</code> and <code>-1302.9</code>  to <code>Excel</code> using combined <code>Pandas+xlsxwriter</code>, or is this best done individually without the <code>groupby function</code>?</p>
  
  <p>Thanks</p>