Series.eq
Check all the values in a series is equal to another value
danfo.Series.eq(other)
Parameters | Type | Description | Default |
---|
| | | |
Returns: Series (Boolean element)
Examples
Compare all the values in a series to another series
const dfd = require("danfojs-node")
let data1 = [10, 45, 56, 25, 23, 20, 10]
let data2 = [10, 450, 56, 5, 25, 2, 0]
let sf1 = new dfd.Series(data1)
let sf2 = new dfd.Series(data2)
sf1.eq(sf2).print()
╔═══╤═══════╗
║ 0 │ true ║
╟───┼───────╢
║ 1 │ false ║
╟───┼───────╢
║ 2 │ true ║
╟───┼───────╢
║ 3 │ false ║
╟───┼───────╢
║ 4 │ false ║
╟───┼───────╢
║ 5 │ false ║
╟───┼───────╢
║ 6 │ false ║
╚═══╧═══════╝
Check it all the values are equal to a value
const dfd = require("danfojs-node")
let data1 = [10, 45, 56, 25, 23, 20, 10]
let sf1 = new dfd.Series(data1)
sf1.eq(10).print()
╔═══╤═══════╗
║ 0 │ true ║
╟───┼───────╢
║ 1 │ false ║
╟───┼───────╢
║ 2 │ false ║
╟───┼───────╢
║ 3 │ false ║
╟───┼───────╢
║ 4 │ false ║
╟───┼───────╢
║ 5 │ false ║
╟───┼───────╢
║ 6 │ true ║
╚═══╧═══════╝