title: creating a Piechart in Plotly/Dash out of a Dataframe/Pivot Table
body: <p>This is my code, as a quick explanation I am filtering my dataframe to select the correct KPI, in this case Operator Share, the correct country, which is prestored in the variable country and the year 2017.
  Then I want to create a piechart that uses the KPIvalues of the different specifications. So Specifications should be the labels and KPI values the values.</p>
  
  <pre><code>df_plot_operator_share = df[df['Country'] == Country]
  df_plot_operator_share = df.loc[(df['KPIname'].isin(['OperatorShare'])) &amp; (df['YearNb']==2017)]
  
  pv_operator_share = pd.pivot_table(
  df_plot_operator_share,
  index=['Specification'],
  values=['KPIvalue'],
  aggfunc=sum,
  fill_value=0)
  
  trace1 = go.Pie(
  lables= pv_operator_share.index, values= pv_operator_share["KPIvalue"],
  name='OperatorShare')
  return {
  'data': [trace1],
  'layout':
  go.Layout(
      title='Country: {} Operator Share'.format(Country),
      )
  </code></pre>
  
  <p>}</p>
  
  <p>The Pivot has the Specifications has the headers and the KPIvalues as its values.</p>
  
  <p>I want to have a pie chart that uses the Specifications as labels and the KPIvalues as values.</p>
  
  <p>But for some reason it is not working.</p>