Quick start
This guide presents the simplest path for using mespy: load a file, run a few basic statistics, create a plot, and, if needed, perform a linear fit.
If you want to study the function code and the mathematical meaning of the results, go directly to the Modules section. Each module collects the conceptual overview and the pages dedicated to individual public functions.
Main modules
io_utilshandles CSV loading.stats_utilscollects the statistical functions.plot_utilscontains the visualization tools.fit_utilscontains the linear fit and its result type.
First workflow
from mespy import histogram, load_csv, variance
df = load_csv(
"data/reference/test_misure.csv",
rename_columns={"misura_n": "n", "lunghezza_mm": "lunghezza", "sigma_mm": "sigma"},
required_columns=["n", "lunghezza", "sigma"],
missing="drop",
)
var_l = variance(df["lunghezza"])
fig, ax = histogram(df["lunghezza"], title=f"Varianza = {var_l:.3f} mm^2")