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 Distribution
ranking-0.1.tar.gz
(2.4 kB
view details)
File details
Details for the file ranking-0.1.tar.gz
.
File metadata
- Download URL: ranking-0.1.tar.gz
- Upload date:
- Size: 2.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b3ac55b9edb5ca348f4a30c4b8823e5b23b1f7e1dd5643812699edc950de33a1 |
|
MD5 | 63f2c7c7994b4b254236a95adfd2730a |
|
BLAKE2b-256 | 347a0289e2caad303dd74831bc5df3d7268c8c884494107ce98c45dd385b382e |