Where the numbers came from
Not met yet
Where a number came from is part of the number: who measured it, where, with what instrument, under what licence, and what the source's own notes say about it. Station files mark estimated values, provisional months and changes of instrument; keep those marks as columns of their own rather than stripping them and forgetting. Read the notes above a table before the table, find its start rather than counting lines, and credit the source as its licence asks.
Try it
main.pyOutput
Press Run and what your program prints shows up here.
Easy to get wrong
- Thinks pd.to_numeric(errors="coerce") only turns the missing-value marker into NaN. It turns anything that isn't a plain number into NaN, marked values included.
- Thinks the marks after values in a source file (estimated, provisional, a change of instrument) can be stripped and forgotten. They say how far to trust each number.
- Thinks a yearly total with a missing month is still that year's total. It is a smaller number that was never measured.
- Thinks every file from the same source has the same number of lines before the table, so counting them is safe.