Language

Python

First appeared
1991
Paradigm
Multi-paradigm (imperative, object-oriented, functional)
Toolchain
CPython 3.15.2
Container image
python:3.15.2-slim-trixie

Python is the most common language for data science today, but almost always with NumPy, pandas, and scikit-learn doing the work. None of those ship with Python, and pip is removed from this image, so here it has only its standard library. That library is generous: csv reads the data by header name, math has square roots, logs, and math.dist, and statistics has mean, median, variance, stdev, and even linear_regression and correlation. The from-scratch versions skip statistics so the arithmetic stays visible, which makes Python the baseline the other languages are compared against.

Quirks

Concepts in Python

Run the examples locally

You need Docker and Python 3. The harness builds the pinned container and runs every Python example:

git clone https://github.com/qnixon/dswithx.git
cd dswithx
python3 harness/run_tests.py --language python