Summary
The current API operates on raw arrays / scalars per measurement. Real pilot-plant workflows produce CSV exports with multiple steady-state runs per file (e.g. experiments A–E in `ExperimentLabels`). Users have to manually slice rows, call `analyse_exchanger` per run, and re-assemble results.
A thin DataFrame integration would let users go from "raw plant CSV" to "results table" in one call.
Motivation
- Aligns with the unreleased item already listed in `CHANGELOG.md` ("Pandas DataFrame integration for batch experiment processing")
- Removes ~30 lines of glue code per analysis script
- Enables direct comparison across experiments without manual bookkeeping
Proposed API
```python
import pandas as pd
from meapy.heat_transfer import analyse_exchanger_batch
df = pd.read_csv("plant_data.csv")
results = analyse_exchanger_batch(
df,
column_map={
"mea_flow_kg_h": "FT103",
"t_mea_in_c": "TT201",
# ...
},
fixed={"area_m2": 0.30, "cp_mea_j_kg_k": 3940},
group_by="experiment_label",
)
results is a DataFrame indexed by experiment_label with columns
u_w_m2_k, lmtd_k, efficiency, effectiveness, ntu, ...
```
Acceptance criteria
Out of scope
- Polars integration (separate ticket if requested)
- Direct database (Postgres/SQLite) connectors
Summary
The current API operates on raw arrays / scalars per measurement. Real pilot-plant workflows produce CSV exports with multiple steady-state runs per file (e.g. experiments A–E in `ExperimentLabels`). Users have to manually slice rows, call `analyse_exchanger` per run, and re-assemble results.
A thin DataFrame integration would let users go from "raw plant CSV" to "results table" in one call.
Motivation
Proposed API
```python
import pandas as pd
from meapy.heat_transfer import analyse_exchanger_batch
df = pd.read_csv("plant_data.csv")
results = analyse_exchanger_batch(
df,
column_map={
"mea_flow_kg_h": "FT103",
"t_mea_in_c": "TT201",
# ...
},
fixed={"area_m2": 0.30, "cp_mea_j_kg_k": 3940},
group_by="experiment_label",
)
results is a DataFrame indexed by experiment_label with columns
u_w_m2_k, lmtd_k, efficiency, effectiveness, ntu, ...
```
Acceptance criteria
Out of scope