title: Plotting a Pie chart from a dictionary?
body: <p>I am attempting to construct a pie chart of the weighting of certain sectors in a index.</p>
  <p>given this sample data frame.</p>
  <pre><code>Data = { 'Company': ['Google', 'Nike', 'Goldman', 'Tesla'], 'Ticker': ['GOOG', 'NKE', 'GGG', 'TSA'], 'Sector': ['Tech', 'Consumer', 'Financial', 'Auto'], 'Weighting': ['10', '20', '40', '30']
  
  df = pd.DataFrame(Data)
  </code></pre>
  <p>I have tried to create a dictionary of weights by sector.</p>
  <pre><code>Weight_Sector = df.groupby('Sector')['Weighting'].apply(list).to_dict()
  </code></pre>
  <p>I checked the dictionary and all was good. However when I went on to plot the pie chart with the following code, I get an error 'ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (9,) + inhomogeneous part.</p>
  <pre><code>plt.pie(Weight_Sector.values(), startangle=90, autopct='%.1f%%')
  </code></pre>
  <p>In my actual data frame and dictionary there is a lot more values and most dictionary sectors have more than 1 item as a weight in them corresponding to different companies.</p>
  <p>Any help is appreciated!!</p>