nan_aware_weighted_mean#
- openstef_core.utils.pandas.nan_aware_weighted_mean(values: DataFrame, weights: DataFrame) pd.Series[float][source]#
Weighted mean that redistributes NaN values’ weights proportionally.
For each row, weights corresponding to NaN values are zeroed out and the remaining weights are used to compute the weighted sum, normalized by their total. If all values in a row are NaN, the result is 0.