title: plot histogram in python using csv file as input
body: <p>I have a csv file which contains two columns where first column is fruit name and second column is count and I need to plot histogram using this csv as input to the code below. How do I make it possible. I just have to show first 20 entries where fruit names will be x axis and count will be y axis from entire csv file of 100 lines.   </p>
  
  <pre><code>import matplotlib.pyplot as plt
  import pandas as pd
  
  data = pd.read_csv('data.csv', header = None ,quoting=2)
  
  data.hist(bins=10)
  plt.xlim([0,100])
  plt.ylim([50,500])
  plt.title("Data")
  plt.xlabel("fruits")
  plt.ylabel("Frequency")
  plt.show()
  </code></pre>
  
  <p>I edited the above program to plot a bar chart -</p>
  
  <pre><code>import matplotlib.pyplot as plt
  import pandas as pd
  
  data = pd.read_csv('data.csv', sep=',',header=None)
  data.values
  print data
  plt.bar(data[:,0], data[:,1], color='g')
  plt.ylabel('Frequency')
  plt.xlabel('Words')
  plt.title('Title')
  
  plt.show()
  </code></pre>
  
  <p>but this gives me an error 'Unhashable Type '. Can anyone help on this.</p>