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

Method div

src/danfojs-base/core/series.ts:391–403  ·  view source on GitHub ↗
(other: Series | number | Array<number>, options?: { inplace?: boolean })

Source from the content-addressed store, hash-verified

389 */
390 div(other: Series | number | Array<number>, options?: { inplace?: boolean }): Series
391 div(other: Series | number | Array<number>, options?: { inplace?: boolean }): Series | void {
392 const { inplace } = { inplace: false, ...options }
393
394 if (this.dtypes[0] == "string") ErrorThrower.throwStringDtypeOperationError("div")
395
396 const newData = _genericMathOp({ ndFrame: this, other, operation: "div" })
397
398 if (inplace) {
399 this.$setValues(newData as ArrayType1D)
400 } else {
401 return utils.createNdframeFromNewDataWithOldProps({ ndFrame: this, newData, isSeries: true }) as Series
402 }
403 }
404
405 /**
406 * Return Exponential power of series and other, element-wise (binary operator pow).

Callers

nothing calls this directly

Calls 3

_genericMathOpFunction · 0.90
$setValuesMethod · 0.80

Tested by

no test coverage detected