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

Method round

src/danfojs-base/core/series.ts:690–705  ·  view source on GitHub ↗
(dp = 1, options?: { inplace?: boolean })

Source from the content-addressed store, hash-verified

688 */
689 round(dp?: number, options?: { inplace?: boolean }): Series
690 round(dp = 1, options?: { inplace?: boolean }): Series | void {
691 const { inplace } = { inplace: false, ...options }
692 if (dp === undefined) dp = 1;
693 const newValues = utils.round(this.values as number[], dp, true);
694
695 if (inplace) {
696 this.$setValues(newValues)
697 } else {
698 return utils.createNdframeFromNewDataWithOldProps({
699 ndFrame: this,
700 newData: newValues,
701 isSeries: true
702 }) as Series
703 }
704
705 }
706
707 /**
708 * Return sample standard deviation of elements in Series

Callers

nothing calls this directly

Calls 3

$setValuesMethod · 0.80
roundMethod · 0.65

Tested by

no test coverage detected