dataFrame.column.stat — skewness()
Description
The skewness() method of the stat object returns the skewness of the values in the selected column.
Signature
dataFrame.column(columnName).stat.skewness({ estimator: 'sample' })Argument
columnName(string)- The name of the column from which to compute skewness.
options(object)- Skewness calculation options.
Option
estimator(string)- The estimator used to compute skewness.
populationsample(default)
Returns
skewness(number)- The skewness of the values in the selected column.
Notes
- The
populationestimator computes skewness using the population formula. - The
sampleestimator applies the sample skewness correction. - Positive values indicate right-skewed distributions.
- Negative values indicate left-skewed distributions.
- A value close to zero indicates a roughly symmetric distribution.
Example
// get the skewness of values of a column of the dataFrame
var skewness = dataFrame.column('revenue').stat.skewness();
// log the skewness
notebook.log(skewness);