title: How to get a frequency of the elements in python?
body: <p>I am new to python and struggling a little in manipulating lists. I have a list which roughly looks like this</p>
  
  <pre><code>rows = [[u'12'], [u'12'], [u'12'], [u'12'], [u'13'], [u'13'], [u'14'], [u'14'], [u'14']]
  </code></pre>
  
  <p>. I want to get the count of each of these elements. I would like the result to look like this </p>
  
  <pre><code>res = [[12,4], [13,2], [14,3]]
  </code></pre>
  
  <p>How do I do this? I tried </p>
  
  <pre><code>collections.Counter(rows)
  </code></pre>
  
  <p>but it gave me </p>
  
  <pre><code>TypeError: Unhashable type 'list'
  </code></pre>