Documentation

mean() function

Flux 0.7.0+

The mean() function computes the mean or average of non-null records in the input table. mean() is an aggregate function.

Output data type: Float

mean(column: "_value")

Parameters

column

Column to use to compute the mean. Default is "_value".

tables

Input data. Default is piped-forward data (<-).

Examples

The following example uses data provided by the sampledata package to show how mean() transforms data.

import "sampledata"

sampledata.int()
  |> mean()

View input and output


Upgrade to InfluxDB Cloud or InfluxDB 2.0!

InfluxDB Cloud and InfluxDB OSS 2.0 ready for production.