dataFrame.column.stat — mean()

Description

The mean() method of the stat object returns the arithmetic mean of the values in the selected column.

Signature

dataFrame.column(columnName).stat.mean()
Scope
column
Family
stat
Returns
number

Argument

columnName (string)
The name of the column from which to get the mean value.

Returns

mean (number)
The arithmetic mean.

Example

// get the mean of a column of the dataFrame
var mean = dataFrame.column('revenue').stat.mean();

// log the mean
notebook.log(mean);