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

Method min

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

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

()

Source from the content-addressed store, hash-verified

543 *
544 */
545 min(): number {
546 const values = this.$checkAndCleanValues(this.values as ArrayType1D, "min")
547 let smallestValue = values[0]
548 for (let i = 0; i < values.length; i++) {
549 smallestValue = smallestValue < values[i] ? smallestValue : values[i]
550 }
551 return smallestValue
552 }
553
554 /**
555 * Returns the maximum value in a Series

Callers 1

describeMethod · 0.95

Calls 1

$checkAndCleanValuesMethod · 0.95

Tested by 1

describeMethod · 0.76