dataFrame.column.stat — median()
Description
The median() method of the stat object returns the median of the values in the selected column.
Signature
dataFrame.column(columnName).stat.median()Arguments
columnName(string)- The name of the column from which to get the mean value.
options(object)- Median calculation options.
Option
sorted(boolean)- Indicates whether the values are already sorted in ascending order.
- Sorted:
true - Not sorted:
false(default)
- Sorted:
Returns
median(number)- The median.
Example
// get the median of a column of the dataFrame
var median = dataFrame.column('revenue').stat.median();
// log the median
notebook.log(median);