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.3.tar.gz
(4.9 kB
view details)
File details
Details for the file ranking-0.2.3.tar.gz
.
File metadata
- Download URL: ranking-0.2.3.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 23a5405e9935abb649674d81011ba4b0ddfbe7d0e67db8db18a927537a935093 |
|
MD5 | fc189d80d395d0f15e83a16b068c00b2 |
|
BLAKE2b-256 | 2b9068104535b99cbe79db2a5df5e8eab70369b6aae3718cc23fbacbaff9501a |