title: How to aggregate data and plot all groups
body: <p>I have the following dataset :</p>
  <pre><code>df=pd.read_csv('https://raw.githubusercontent.com/michalis0/DataMining_and_MachineLearning/master/data/sales.csv')
  </code></pre>
  <p>I want to visualize the average sales by types of Customer (<code>Segment</code>).</p>
  <p>I calculated the average sales by segment with this :</p>
  <pre><code>average_sales = df.groupby(['Segment','OrderYear'],as_index=True)['Sales'].agg({&quot;mean&quot;})
  print(average_sales)
  </code></pre>
  <p>And I get the following output:</p>
  <pre><code>                           mean
  Segment     OrderYear            
  Consumer    2015       251.633302
              2016       238.200804
              2017       223.269145
              2018       200.469005
  Corporate   2015       212.641424
              2016       189.902305
              2017       263.348456
              2018       243.634951
  Home Office 2015       290.234240
              2016       222.101830
              2017       226.382196
              2018       242.532951
  </code></pre>
  <p>Now I want to plot it in a line chart with the year on the x_axis and average sales on y_axis but everytime I try I only get one line for <code>mean</code> while I want one line for each <code>Segment</code>.
  One line for 'Consumer', one for 'Corporate', one for 'Home Office'.
  I think it might be because Segment is an index rather than a column but I still can't plot by segment.</p>