Skip to main content

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

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)

Table of built distributions (wheels) for ranking 0.3.2
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

0.3.2 This release

1 release file

0.3.1

1 release file

0.3

1 release file

0.2.4

1 release file

0.2.3

1 release file

0.2.2

1 release file

0.2.1

1 release file

0.2

1 release file

0.1.1

1 release file

0.1

1 release file

0.0.0

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page