solarforecastarbiter.metrics.preprocessing.apply_validation(obs_df, qfilter, handle_func)[source]

Apply validation steps based on provided filters to the data.

  • obs_df (pandas.DataFrame) – The observation data with ‘value’ and ‘quality_flag’ columns
  • qfilter (solarforecastarbiter.datamodel.QualityFlagFilter) –
  • handle_func (function) – Function that handles how quality_flags will be used. See solarforecastarbiter.metrics.preprocessing.exclude as an example.

  • validated_obs (pandas.Series) – The validated timeseries data as pandas.Series.
  • counts (dict) – Dict where keys are qfilter.quality_flags and values are integers indicating the number of points filtered for the given flag.