statistics
A Python 2.* port of 3.4 Statistics Module
What it is and what it does
This package is a backport of Python 3.4's statistics module to Python 2.x, created by converting the official CPython implementation using the 3to2 tool. It provides functions for calculating basic descriptive statistics—mean, median, mode, standard deviation, and variance—on numeric data.
The package was last released on 2014-10-16 and is no longer maintained. With a maintenance status of abandoned and no updates in 4320 days, this backport is effectively obsolete. Installing it serves no practical purpose for new code.
Use it for:
- Legacy Python 2.6 or 2.7 codebases that need basic statistical calculations and cannot be upgraded.
- Educational projects demonstrating how to port standard library modules between Python versions using automated tools.
- Historical reference for understanding how the official statistics module was adapted for older Python versions.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides basic mathematical statistics functions (mean, median, mode, standard deviation, variance) for Python 2.x, backported from Python 3.4's standard library statistics module.
No. This package is abandoned (last updated 2014-10-16) and targets Python 2.6 and 2.7. Install only if you are maintaining legacy code on those versions that cannot be upgraded; otherwise, use Python 3's built-in statistics module.
Install
statistics on PyPI
pip
pip install statisticsuv
uv add statisticspoetry
poetry add statisticsInstalling statistics
Before you install
High install friction due to abandonment: last release was 2014-10-16 and maintenance status is abandoned. No updates in over 4320 days.
License in practice
Licensed under Apache License 2.0 (permissive), so commercial and private use are permitted without restriction.
Quickstart
pip install statistics
import statistics
data = [1, 2, 3, 4, 5]
mean_value = statistics.mean(data)
median_value = statistics.median(data)
Requires Python 2.6 or 2.7; modern Python versions include statistics in the standard library.
Verify before relying
- Whether Python 2 environments where this package runs remain viable for production use.
- Whether the 3to2 conversion process introduced any numerical accuracy or edge-case handling differences from the official Python 3.4 statistics module.
- Current compatibility with Python 2.6 and 2.7 on modern systems.
Package facts
| License | Apache License 2.0 (permissive) |
| Python support | not specified |
| Install friction | high — source build required |
| Runtime dependencies | none |
| Maintenance | abandoned — 4,320 days since the last release |
| First released | |
| Downloads | 212,074/month — #9,466 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: statistics-1.0.3.5.tar.gz
Keywords: statistics
Tags
More Mathematics packages
NetworkX provides data structures and…
permissive · top 1,000 on PyPI
kiwisolverkiwisolver is a Python binding to a fast C++…
permissive · top 1,000 on PyPI
sympySymPy is a Python library for symbolic…
permissive · top 1,000 on PyPI
contourpyContourPy calculates contours of 2D…
permissive · top 1,000 on PyPI
torchPyTorch provides GPU-accelerated tensor…
permissive · top 1,000 on PyPI
onnxruntimeonnxruntime loads and executes Open Neural…
permissive · top 1,000 on PyPI
runstatsComputes summary statistics (mean, variance,…
permissive · top 15,000 on PyPI
rasterstatsRasterstats computes summary statistics (mean,…
permissive · top 15,000 on PyPI
pytensor-distributionsPyTensor-distributions provides a collection of…
permissive · top 15,000 on PyPI
stockstatsAdds technical analysis indicators and…
permissive · top 15,000 on PyPI
backports.sslProvides the Python 3.4 ssl module API on older…
permissive · top 15,000 on PyPI
powerlawFits heavy-tailed distributions like power laws…
permissive · top 15,000 on PyPI
uncertaintiesPerforms arithmetic and mathematical operations…
permissive · top 5,000 on PyPI
lovely-numpyProvides a human-readable summary of NumPy…
permissive · top 15,000 on PyPI
momentchi2Computes the cumulative distribution function…
permissive · top 15,000 on PyPI
statsmodelsstatsmodels provides statistical models,…
permissive · top 1,000 on PyPI