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

Method minimum

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

* Return minimum of series and other. * @param other Series, number of Array of numbers to check against * @example * ``` * const sf = new Series([1, 2, 3, 4, 5, 6]); * const sf2 = sf.minimum(3); * console.log(sf2.values); * //output [ 1, 2, 3, 3, 3, 3 ]

(other: Series | number | Array<number>)

Source from the content-addressed store, hash-verified

656 *
657 */
658 minimum(other: Series | number | Array<number>): Series {
659 if (this.dtypes[0] == "string") ErrorThrower.throwStringDtypeOperationError("maximum")
660
661 const newData = _genericMathOp({ ndFrame: this, other, operation: "minimum" })
662 return new Series(newData, {
663 columns: this.columns,
664 index: this.index
665 });
666 }
667
668 /**
669 * Round each value in a Series to the specified number of decimals.

Callers

nothing calls this directly

Calls 1

_genericMathOpFunction · 0.90

Tested by

no test coverage detected