Ranking
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
Metadata
Release files for ranking 0.3.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ranking-0.3.2-py3-none-any.whl | Python 3 | none | any | Details |
Release files / ranking-0.3.2-py3-none-any.whl
| Download URL | ranking-0.3.2-py3-none-any.whl |
|---|---|
| Size | 8.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e46dd802e6eb0af5ce34d8c12bccfaf22bed67475cbe6e21bc2be7ae0ebc199c
|
|
BLAKE2b-256 checksum How to use checksums |
03f206f55d2808550b376e445f071d5e7375e2f1922be3f62194c6fad6f13bef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.1
|