Democritus Stats
Democritus functions[1] for working with statistics.
[1] Democritus functions are simple, effective, modular, well-tested, and well-documented Python functions.
We use d8s (pronounced "dee-eights") as an abbreviation for democritus (you can read more about this here).
Installation
pip install d8s-stats
Usage
You import the library like:
from d8s_stats import *
Once imported, you can use any of the functions listed below.
Functions
-
def statistical_overview( data, *, data_is_sample: bool = False, result_if_no_mode: Any = None, raise_error_if_no_mode: bool = True ): """Return an overview of the data's statistical properties."""
-
def mode(data, *, result_if_no_mode: Any = None, raise_error_if_no_mode: bool = True): """Return the item in the data which occurs the greatest number of times."""
-
def variance(data, *, data_mean=None, data_is_sample: bool = False): """Return the variance of the data (assuming the data represents an entire population)."""
-
def stdev(data, *, data_mean=None, data_is_sample: bool = False): """Return the standard deviation of the data (assuming the data represents an entire population)."""
-
def mean(iterable): """Return the average of the list."""
-
def harmonic_mean(iterable): """Return the harmonic mean of the list."""
-
def geometric_mean(iterable): """Return the geometric mean of the list."""
Development
👋 If you want to get involved in this project, we have some short, helpful guides below:
If you have any questions or there is anything we did not cover, please raise an issue and we'll be happy to help.
Credits
This package was created with Cookiecutter and Floyd Hightower's Python project template.
Release files for d8s-stats 0.6.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| d8s_stats-0.6.0.tar.gz | 90.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| d8s_stats-0.6.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 109.2 kB
Release files / d8s_stats-0.6.0.tar.gz
| Download URL | d8s_stats-0.6.0.tar.gz |
|---|---|
| Size | 90.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
439bd1aae17336b9d1a3e377efae762aa205b53e0a1c3c2a5397e902e6a7ea75
|
|
BLAKE2b-256 checksum How to use checksums |
fbf96bd9934c7dc55366940ecf8a1dfb70daa35de50d313d5ba156e0a64b5137
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 1, 2026.
Transparency logRelease files / d8s_stats-0.6.0-py3-none-any.whl
| Download URL | d8s_stats-0.6.0-py3-none-any.whl |
|---|---|
| Size | 18.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
eb5eb3845b3a4e05be1195d9928d9c8d292b4493e93646ecd422f1816fa83a24
|
|
BLAKE2b-256 checksum How to use checksums |
0cb0ccb004915a327799454f95ef323ae02925637d8062d2199efab70df73235
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 1, 2026.
Transparency log