Streaming statistics
This is module for streaming statistics. It can efficiently calculate statistics on a stream of numbers in a minimum amount of memory.
It provides the following statistics:
| Statistic | Description |
|---|---|
n |
Number of values |
min |
Minimum value |
max |
Maximum value |
sum |
Sum of values |
mean |
Mean value |
stddev |
Standard deviation |
variance |
Variance |
In addition to the above statistics, it also provides the following percentiles: 1st, 5th, 25th, 50th, 75th, 95th, and 99th.
Here is an example result:
{
"n": 177966,
"mean": 237.02426306148718,
"variance": 184870.5448188569,
"stddev": 429.9657484252169,
"min": 0,
"max": 33408,
"sum": 42182260,
"1st": 5.002829575110743,
"5th": 17.994143369901202,
"10th": 25.791844500743554,
"25th": 49.90296094906744,
"50th": 100.4945677085671,
"75th": 242.2894312639693,
"90th": 607.9931874110874,
"95th": 925.3552129773512,
"99th": 1826.5794537820188
}
A script, script/stats will read numbers from standard input and print the statistics to standard output.
Installation
This code uses the poetry system to install Python dependencies. To install, clone this
repository, and then:
$ poetry install
$ poetry shell
It is also available as a Python package on PyPI.
$ pip install streaming_statistics
Metadata
Release files for streaming-statistics 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| streaming_statistics-1.0.2.tar.gz | 2.5 kB | Without provenance | Details for streaming_statistics-1.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| streaming_statistics-1.0.2-py3-none-any.whl | Python 3 | none | any | Details for streaming_statistics-1.0.2-py3-none-any.whl |
Total release size: 5.9 kB
Release files / streaming_statistics-1.0.2.tar.gz
| Download URL | streaming_statistics-1.0.2.tar.gz |
|---|---|
| Size | 2.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2083d2a01cef02664754deca986d21d46344a1257f230af678138c7a1d3f373f
|
|
BLAKE2b-256 checksum How to use checksums |
e0ef1a7a258b707fb05a95ce9be76c128d5fb045ce24568cbfabe94b7ddadde5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.12.3 Darwin/23.5.0
|
Release files / streaming_statistics-1.0.2-py3-none-any.whl
| Download URL | streaming_statistics-1.0.2-py3-none-any.whl |
|---|---|
| Size | 3.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
26d837ff5147a97c2006fb98c892f912b56ea51151d6e2277d7dd7bd9bc217d8
|
|
BLAKE2b-256 checksum How to use checksums |
73d94092e1ce55b17b0d81bacb172d654bcc41d2653569487b57c07ab1aed47c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.12.3 Darwin/23.5.0
|
Security for streaming-statistics 1.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.