BUG: wrong count of stations in preprocessing reporting
The number of stations per subset was always 1 to high.
Reason:
The following was executed:
df.loc["# Samples", set_name] = df.loc[:, set_name].sum()
df.loc["# Stations", set_name] = df.loc[:, set_name].count()
But the .count()
also counts the entry for # Samples
and therefore the number of stations is 1 to high. Fix this with the following.
df.loc["# Samples", set_name] = df.loc[:, set_name].sum()
assert len(data) == df.loc[:, set_name].count()-1
df.loc["# Stations", set_name] = len(data)
The 2nd line is not required but ensures that the length of the data collection is equal to the number of stations.