title: Creating percentile buckets in pandas
body: <p>I am trying to classify my data in percentile buckets based on their values. My data looks like, </p>
  
  <pre><code>a = pnd.DataFrame(index = ['a','b','c','d','e','f','g','h','i','j'], columns=['data'])
  a.data = np.random.randn(10)
  print a
  print '\nthese are ranked as shown'
  print a.rank()
  
         data
  a -0.310188
  b -0.191582
  c  0.860467
  d -0.458017
  e  0.858653
  f -1.640166
  g -1.969908
  h  0.649781
  i  0.218000
  j  1.887577
  
  these are ranked as shown
     data
  a     4
  b     5
  c     9
  d     3
  e     8
  f     2
  g     1
  h     7
  i     6
  j    10
  </code></pre>
  
  <p>To rank this data, I am using the rank function. However, I am interested in the creating a bucket of the top 20%. In the example shown above, this would be a list containing labels ['c', 'j']</p>
  
  <pre><code>desired result : ['c','j']
  </code></pre>
  
  <p>How do I get the desired result</p>