title: Python 3: pandas group multiindex and mean of 2 separate columns per multiindex
body: <p>What code do I need to perform a <code>mean</code> of both drugs and health per session by type.</p>
  <p><a href="https://i.stack.imgur.com/JTOsL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JTOsL.png" alt="enter image description here" /></a></p>
  <pre><code>df[['drugs', 'health', 'session', 'type']]
  </code></pre>
  <p>these all are currently columns. I though it ought to be indexed by both <code>session</code> (first) and then <code>type</code>.</p>
  <pre><code>grouped_S = grouped['session'].as_index=True
  grouped_c = grouped['type'].as_index=True
  grouped_dh = grouped['drugs', 'health'].mean().as_index=False
  </code></pre>
  <p>How do I correct this code to make it work: getting an average of drugs and health per session and by type?</p>