Data and statistics
Import data
import plotora as pt
df = pt.load("measurements.csv")
df = pt.clean(df, columns=["time", "voltage"], dropna=True, sort="time")
pt.plot(df["time"], df["voltage"], xlabel="Time (s)", ylabel="Voltage (V)").show()
# Or directly:
pt.from_file("measurements.csv", "time", "voltage").show()
CSV/TXT/TSV/DAT use pandas delimiter inference unless overridden. XLSX and JSON use pandas. Standard MAT files use SciPy; optional h5py handles top-level arrays for v7.3 files, not arbitrary MATLAB object structures. clean supports column selection, dropna, fill and sorting; merge joins pandas tables and normalize performs min-max scaling.
Fit experimental data
x = [0,1,2,3,4]
y = [1,3.1,4.8,7.2,9]
g = pt.regression(x,y,degree=1,interval="confidence")
print(g.metadata["coefficients"], g.metadata["r_squared"])
pt.residuals(x,g).show()
g.show()

Polynomial coefficients are in ascending order, unlike transfer-function coefficients. OLS confidence and prediction intervals rely on model and error assumptions; nonlinear confidence intervals are not implemented. curve_fit accepts a callable and returns coefficients and covariance in metadata. The logarithmic and exponential models have different domains/assumptions.
Measurements and uncertainty
print(pt.describe([1.1, 1.3, 1.2]))
value, standard_uncertainty = pt.propagate(lambda a,b: a+b, [2,3], [.3,.4])
print(value, standard_uncertainty)
print(pt.convert(0.02, "s", "ms"))
describe uses sample variance and standard deviation. propagate performs first-order numerical uncertainty propagation; optional covariance is supported. This approximation can be inappropriate for nonlinear or discontinuous models. convert supports common units directly, and arbitrary compatible units via optional Pint.