lisa.datautils.series_mean#

lisa.datautils.series_mean(y, x=None, **kwargs)[source]#

Compute the average of y by integrating with respect to x and dividing by the range of x.

Returns:

A scalar \(\int_{x=A}^{x=B} \frac{y}{| B - A |} \, dx\), where x is either the index of y or another series.

Parameters:
  • y (pandas.DataFrame) – Series with the data to integrate.

  • x (pandas.DataFrame or None) – Series with the x data. If None, the index of y will be used. Note that y and x are expected to have the same index.

Variable keyword arguments:

Forwarded to series_integrate().