Get Started#
Battery Data Format (BDF) is a canonical schema for cycler time-series data.
The bdf package reads vendor exports, normalizes them into BDF, validates
and repairs datasets, and produces metadata for sharing.
What BDF standardizes#
BDF fixes the column labels and units so datasets from different cyclers can be compared without custom glue code.
Required columns:
Test Time / sVoltage / VCurrent / A
Common recommended columns:
Unix Time / sCycle Count / 1Step Count / 1Ambient Temperature / degC
Install#
pip install batterydf
PyPI distribution name is batterydf; Python import and CLI remain bdf.
Extras (combine as needed, for example pip install "batterydf[nda,plot]"):
Extra |
Adds |
|---|---|
|
Neware .nda/.ndax support (fastnda backend, requires numpy>=2.2). |
|
BioLogic .mpr support (via yadg). |
|
Excel support via the fast |
|
MATLAB .mat support. |
|
Arbin .res support. |
|
YAML plugin definitions. |
|
Static (matplotlib) interactive (plotly) plotting. |
|
Interactive exploration with Bokeh/HoloViews. |
|
Every extra above. |
Dev-only tooling (tests, linting, docs) are in [dependency-groups],
clone the repo and use uv sync – see CONTRIBUTING.md for more info.
Quickstart notebook#
Open the rendered notebook:
First steps#
import bdf
# read() returns (frame, metadata); the frame is a polars frame
df, meta = bdf.read("raw_vendor.csv") # auto-detect and normalize
df = df.to_pandas() # the validate/plot helpers operate on pandas
report = bdf.validate(df, report=True, raise_on_error=False)
bdf.plot(df, xdata="Test Time / s", ydata=["Voltage / V"], save="plot.png")
Recommended usage#
Use bdf.read for the common path (raw vendor files or existing BDF artifacts).
The other functions are for advanced workflows:
bdf.read(..., normalize=False): inspect raw vendor columns without normalization.bdf.normalize: normalize a DataFrame you already have in memory.bdf.validate: validate a DataFrame or BDF artifact without re-reading.bdf.save: write a BDF DataFrame to a file.