diff --git a/mlair/run_modules/pre_processing.py b/mlair/run_modules/pre_processing.py index bd3b9ec6fd471dcb6e794a3ba9b498e18ad76a37..21aebd62bab490363797c0ef0624daa1d488097b 100644 --- a/mlair/run_modules/pre_processing.py +++ b/mlair/run_modules/pre_processing.py @@ -164,7 +164,8 @@ class PreProcessing(RunEnvironment): if df.loc[station_name, meta_data].isnull().any(): df.loc[station_name, meta_data] = station.id_class.meta.loc[meta_data].values.flatten() df.loc["# Samples", set_name] = df.loc[:, set_name].sum() - df.loc["# Stations", set_name] = df.loc[:, set_name].count() + assert len(data) == df.loc[:, set_name].count() - 1 + df.loc["# Stations", set_name] = len(data) df[meta_round] = df[meta_round].astype(float).round(precision) df.sort_index(inplace=True) df = df.reindex(df.index.drop(["# Stations", "# Samples"]).to_list() + ["# Stations", "# Samples"], )