Measurement Data Shapes and Missing Value Handling · Study

English translation

Topics covered

Convert a measurement table into an analyzable array, checking missing values, units, and plots. Review only the Python syntax needed for this task.

Meaning of one measurement

A device ID, measurement time, value, and unit are needed to interpret sensor numbers. A dictionary names the fields, and a list holds multiple measurements. None indicates a failed observation, distinct from an actual value of 0.

Define processing rules in a function

Handling normal values, missing values, and empty data separately with ad hoc fixes can lead to inconsistent results. Combine input validation and summary calculations in a small function, and check two or three boundary cases.

Worked example

The (hours,score) pairs for 3 students are (2,55),(4,70),(6,85). Time is in h.

records=[{'hours':2,'score':55},{'hours':4,'score':70},{'hours':6,'score':85}]
print([r['hours'] for r in records])
[2, 4, 6]

Reference example

View more examples

Reference materials