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' })
Scope
column
Family
stat
Returns
number

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.
  • population
  • sample (default)

Returns

skewness (number)
The skewness of the values in the selected column.

Notes

  • The population estimator computes skewness using the population formula.
  • The sample estimator 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);