movMean function
The moving mean (also known as moving average) analyzes data points by creating a series of averages of different subsets of the chosen column.
Returns the moving average of the column, evaluated on the lag continuous rows, computed according to groups defined by the group parameter if required.
Each row represents the first value of the lags in which the column will be divided.
Function and parameters
movMean(column, lag, group, front)
Parameter | Description |
---|---|
column | It identifies the column to which you want to apply the formula. The column parameter is mandatory. |
lag | It is the number of continuous rows used to evaluate the moving average. The lag parameter is mandatory. |
group | It allows you to group the results by a certain column. This is an optional parameter. |
front | it is an optional parameter. If not specified,
|
Example
The following example uses the HR-employee-attrition dataset.
Description | Screenshot |
---|---|
| |
|