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

Function sum

src/danfojs-node/test/core/frame.test.ts:1559–1561  ·  view source on GitHub ↗
(x: any)

Source from the content-addressed store, hash-verified

1557 const df = new DataFrame(data)
1558
1559 const sum = (x: any) => {
1560 return x.reduce((a: any, b: any) => a + b, 0)
1561 }
1562 const expected = [6, 7, 3]
1563 const dfApply = df.apply(sum, { axis: 1 })
1564 assert.deepEqual(dfApply.values, expected)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected