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.2.4.tar.gz
(5.5 kB
view details)
File details
Details for the file ranking-0.2.4.tar.gz
.
File metadata
- Download URL: ranking-0.2.4.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | eaa74c0004618e4e00291e14c712964b27396f29fc91e83b71e3fc4fb780f675 |
|
MD5 | bc1f9b45f221b438e7b66bf2b51e8956 |
|
BLAKE2b-256 | 555bbaa4db18ea8aaa894a41e7e0a4a5e0b58968e73c921ad3aa986b54065258 |