MCPcopy Create free account
hub / github.com/javascriptdata/danfojs / median

Method median

src/danfojs-base/core/series.ts:508–511  ·  view source on GitHub ↗

* Returns the median of elements in Series * @example * ``` * const sf = new Series([1, 2, 3, 4, 5, 6]); * console.log(sf.median()); * //output 3.5 * ```

()

Source from the content-addressed store, hash-verified

506 * ```
507 */
508 median(): number {
509 const values = this.$checkAndCleanValues(this.values as ArrayType1D, "median")
510 return median(values);
511 }
512
513 /**
514 * Returns the modal value of elements in Series

Callers 1

describeMethod · 0.95

Calls 1

$checkAndCleanValuesMethod · 0.95

Tested by 1

describeMethod · 0.76