Powered By GitBook
Series.cummax
Returns cumulative maximum over a series
danfo.Series.cummax(options)[source]
Parameters
Type
Description
Default
options
Object
inplace: Whether to perform the operation in-place or not.
{
inplace: false
}
Example
Node
1
const dfd = require("danfojs-node")
2
3
4
let data1 = [10, 45, 56, 25, 23, 20, 10]
5
let sf1 = new dfd.Series(data1)
6
7
sf1.cummax().print()
Copied!
Output
1
╔═══╤══════════════════════╗
2
║ │ 0 ║
3
╟───┼──────────────────────╢
4
║ 0 │ 10 ║
5
╟───┼──────────────────────╢
6
║ 1 │ 45 ║
7
╟───┼──────────────────────╢
8
║ 2 │ 56 ║
9
╟───┼──────────────────────╢
10
║ 3 │ 56 ║
11
╟───┼──────────────────────╢
12
║ 4 │ 56 ║
13
╟───┼──────────────────────╢
14
║ 5 │ 56 ║
15
╟───┼──────────────────────╢
16
║ 6 │ 56 ║
17
╚═══╧══════════════════════╝
Copied!
Last modified 13d ago
Copy link