Skip to content
tishad.net
SearchCtrl K

Lessons / Part 7. Python, notebooks and the tools around them

38 A column heading does not say what kind of number it holds

The count of unique values per column shows which columns are setpoints from the plan and which were measured, before anything is fitted.

What people usually ask

Model yield against temperature from this table.

What comes back

A fit to the temperature column as if every value were measured, when it holds four setpoints typed in from the plan.

Ask this instead

Fit nothing yet. For every column in runs.csv print the number of
unique values and the ten most common values with their counts.
Flag any column where a few round values repeat as a likely
setpoint rather than a measurement, and say which ones. Then ask
me, column by column, which were measured by an instrument and
which were typed from the plan; I will answer each. Only after that,
say which column can stand as the input for yield, and stop.

Attach: The run table as a CSV file.

Why it works: A setpoint column carries the plan rather than the process, and the count of unique values shows which is which before a model is fitted to the wrong one.

Drafted with Fable 5.1 from my notes; chosen and edited by me.