A Python command-line tool for quick analysis of CSV measurement data, aimed at engineers and students: summary statistics, least-squares curve fitting, plots, and dataset cleaning — with numpy, pandas, and matplotlib doing the heavy lifting.
Requires Python 3.10+.
pip install git+https://github.com/khachatryann/datakitOr from a clone:
git clone https://github.com/khachatryann/datakit
cd datakit
pip install .The repository ships a sample dataset in examples/sensor_data.csv.
# Summary statistics for every numeric column, optionally per sensor
datakit stats examples/sensor_data.csv
datakit stats examples/sensor_data.csv --columns temperature_c --group-by sensor
# Least-squares fit: linear, poly:N, or exp — prints coefficients and R^2
datakit fit examples/sensor_data.csv -x temperature_c -y voltage_v --model linear
# Scatter or line plot saved to PNG, with an optional fitted-curve overlay
datakit plot examples/sensor_data.csv -x temperature_c -y voltage_v --fit linear
# Drop (or just flag) rows with missing values and outliers, write a cleaned CSV
datakit clean examples/sensor_data.csv --method iqr --mode dropSee docs/usage.md for every flag, and
examples/README.md for a walkthrough on the sample data.
| Command | What it does |
|---|---|
datakit stats <file> |
count, mean, std, min, quartiles, max per numeric column; --group-by splits by a category column |
datakit fit <file> -x COL -y COL |
least-squares fit (linear, poly:N, exp), prints coefficients and R² |
datakit plot <file> -x COL -y COL |
scatter/line plot to PNG; --fit MODEL overlays the fitted curve |
datakit clean <file> |
drop or flag rows with missing values and outliers (IQR or z-score) |
pip install -e ".[dev]"
pytest # run the test suite
ruff check . # lintThe code layout keeps the CLI thin: src/datakit/cli.py only parses arguments
and dispatches to stats.py, fit.py, plot.py, and clean.py, which are
plain functions over pandas DataFrames and are tested directly.
MIT © 2026 Anton