MCPcopy Index your code
hub / github.com/javascriptdata/danfojs / max

Method max

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

* Returns the maximum value in a Series * @example * ``` * const sf = new Series([1, 2, 3, 4, 5, 6]); * console.log(sf.max()); * //output 6 * ```

()

Source from the content-addressed store, hash-verified

561 * ```
562 */
563 max(): number {
564 const values = this.$checkAndCleanValues(this.values as ArrayType1D, "max")
565 let biggestValue = values[0]
566 for (let i = 0; i < values.length; i++) {
567 biggestValue = biggestValue > values[i] ? biggestValue : values[i]
568 }
569 return biggestValue
570 }
571
572 /**
573 * Return the sum of the values in a series.

Callers 1

describeMethod · 0.95

Calls 1

$checkAndCleanValuesMethod · 0.95

Tested by 1

describeMethod · 0.76