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.3.1.tar.gz
(5.1 kB
view details)
File details
Details for the file ranking-0.3.1.tar.gz
.
File metadata
- Download URL: ranking-0.3.1.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | da59a1ff2b9d3597da31b2c3f3e8fa653ae4c41d28962a90a931068ac22a4996 |
|
MD5 | fd2d19b8a2d7c537abe918e159337d56 |
|
BLAKE2b-256 | d618e6de7dd7f99487a238bcbc36f29e76094b47eaff5f25e39cee696bb6aef6 |