1.7 KiB
1.7 KiB
title | description | aliases | menu | weight | flux/v0.x/tags | related | introduced | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
mean() function | The `mean()` function computes the mean or average of non-null records in the input table. |
|
|
102 |
|
|
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
{{% flux/sample-example-intro %}}
import "sampledata"
sampledata.int()
|> mean()
{{% expand "View input and output" %}} {{< flex >}} {{% flex-content %}}
Input data
{{% flux/sample "int" %}}
{{% /flex-content %}} {{% flex-content %}}
Output data
tag | _value |
---|---|
t1 | 8.5 |
tag | _value |
---|---|
t2 | 8.833333333333334 |
{{% /flex-content %}} {{< /flex >}} {{% /expand %}}