skip to navigation
skip to content

Not Logged In

ranking 0.2

Ranking collection

Package Documentation

Latest Version: 0.3.1

This library provides Ranking iterator to assign rank to each values and various strategies for assigning rankings.

>>> sorted_scores = [100, 90, 90, 80, 70]
>>> for rank, score in Ranking(sorted_scores):
...     print '%d. %d' % (rank + 1, score)
1. 100
2. 90
2. 90
4. 80
5. 70
>>> for rank, score in Ranking(sorted_scores, DENSE):
...     print '%d. %d' % (rank + 1, score)
1. 100
2. 90
2. 90
3. 80
4. 70
 
File Type Py Version Uploaded on Size
ranking-0.2.tar.gz (md5) Source 2012-10-15 2KB
  • Downloads (All Versions):
  • 19 downloads in the last day
  • 192 downloads in the last week
  • 719 downloads in the last month