When sensor logs come from more than one instrument, a column called voltage can mix millivolts and volts. A plot still renders. Before comparing the curves, require a unit on every row and convert to the same unit.

The example below uses synthetic data and runs on Python 3.10+. It keeps the input value and input unit next to the converted value so another person can check the result.

from decimal import Decimal readings = [ ("bench-a", "125", "mV"), ("bench-b", "0.123", "V"), ("bench-c", "120", ""), ] scale_to_v = {"V": Decimal("1"), "mV": Decimal("0.001")} converted, rejected = [], [] for source, value, unit in readings: if unit not in scale_to_v: rejected.append((source, value, unit)) continue amount = Decimal(value) if not amount.is_finite(): rejected.append((source, value, unit)) continue converted.append((source, value, unit, amount * scale_to_v[unit])) for row in converted: print(*row) print("rows held:", len(rejected)) 

Output:

bench-a 125 mV 0.125 bench-b 0.123 V 0.123 rows held: 1 

The held row stays available for review. If the unit changes between export batches, record the source of the unit and review the affected rows together. Keep the raw export untouched and plot from a separately validated table. This check does not resolve calibration, polarity, or whether the instruments measured the same thing.

I work on RigorMed, an AI research workspace where teams can organize research data and outputs in a project. RigorMed website. The example was prepared with AI assistance using synthetic data and run locally.