Why this matters

The bug. if v is shorthand for if bool(v), and bool(0) is False. A reading of 0 (a valid measurement) is indistinguishable from a missing reading (None) in this filter, so they all disappear together.

The fix. Test for the actual condition you mean: v is not None. Use is, not ==, because None == None is fine but np.nan == np.nan is False and other types may overload __eq__ in surprising ways.

Heuristic. Any filter that uses bare if x over a column of numeric data is suspicious. Python's terseness makes the bug invisible — the right test is always 'what value am I trying to exclude?'

Review heuristic

Hunt the diff for implicit conversions: bare + between unknown types, == instead of ===, JS truthiness checks where a strict null-check was meant. Each one is an opportunity for the language to do something the author didn't intend.