title: How to create a heatmap of a single dataframe column
body: <p>I have a dataframe that has an index (words) and a single column (counts) for some lyrics. I am trying to create a heatmap based on the word counts.</p>
  
  <pre><code>    Cuenta
  Que 179
  La  145
  Y   142
  Me  113
  No  108
  </code></pre>
  
  <p>I am trying to produce the heatmap like this:</p>
  
  <pre><code>df1 = pd.DataFrame.from_dict([top50]).T
  df1.columns = ['Cuenta']
  df1.sort_values(['Cuenta'], ascending = False, inplace=True)
  
  result = df1.pivot(index=df1.index, columns='Cuenta', values=df1.Cuenta.count)
  sns.heatmap(result, annot=True, fmt="g", cmap='viridis')
  plt.show()
  </code></pre>
  
  <p>But, it keeps throwing 'Index' object has no attribute 'levels'</p>
  
  <p>Any ideas why this isn't working? I tried using the index or words as a separate column and still doesn't work.</p>