Ranking collection
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.