ranking 0.3.2

Creator: bradpython12

Last updated:

Add to Cart

Description:

ranking 0.3.2

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


Links

GitHub repository
development version

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.