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

Method maximum

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

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

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

Source from the content-addressed store, hash-verified

625 * ```
626 */
627 maximum(other: Series | number | Array<number>): Series {
628 if (this.dtypes[0] == "string") ErrorThrower.throwStringDtypeOperationError("maximum")
629
630 const newData = _genericMathOp({ ndFrame: this, other, operation: "maximum" })
631 return new Series(newData, {
632 columns: this.columns,
633 index: this.index
634 });
635 }
636
637 /**
638 * Return minimum of series and other.

Callers

nothing calls this directly

Calls 1

_genericMathOpFunction · 0.90

Tested by

no test coverage detected