Series.lt
Check if all values in a Series are less than a value.
danfo.Series.lt(other)
Parameters
Type
Description
Default
other
Series, Array or number
value(s) to compare
Returns: Series (boolean element)
Example
Check if all the values in a series are less than a value
Node
1
const dfd = require("danfojs-node")
2
3
let data1 = [10, 45, 56, 25, 23, 20, 10]
4
let sf1 = new dfd.Series(data1)
5
6
sf1.lt(20).print()
Copied!
Output
1
╔═══╤═══════╗
2
║ 0 │ true ║
3
╟───┼───────╢
4
║ 1 │ false ║
5
╟───┼───────╢
6
║ 2 │ false ║
7
╟───┼───────╢
8
║ 3 │ false ║
9
╟───┼───────╢
10
║ 4 │ false ║
11
╟───┼───────╢
12
║ 5 │ false ║
13
╟───┼───────╢
14
║ 6 │ true ║
15
╚═══╧═══════╝
Copied!
check if all the values in a series are less than values in another series.
Node
1
const dfd = require("danfojs-node")
2
3
let data1 = [10, 45, 56, 25, 23, 20, 10]
4
let data2 = [10, 450, 56, 5, 25, 2, 0]
5
let sf1 = new dfd.Series(data1)
6
let sf2 = new dfd.Series(data2)
7
8
sf1.lt(sf2).print()
Copied!
Output
1
╔═══╤═══════╗
2
║ 0 │ false ║
3
╟───┼───────╢
4
║ 1 │ true ║
5
╟───┼───────╢
6
║ 2 │ false ║
7
╟───┼───────╢
8
║ 3 │ false ║
9
╟───┼───────╢
10
║ 4 │ true ║
11
╟───┼───────╢
12
║ 5 │ false ║
13
╟───┼───────╢
14
║ 6 │ false ║
15
╚═══╧═══════╝
Copied!
Copy link