DataFrame.ne
Get Not Equal to of DataFrame and other, element-wise (binary operator eq).
danfo.DataFrame.ne(other, options)
Parameters
Type
Description
Default
other
DataFrame, Series, Array, Scalar
Data structure, or array-like object to compare against
options
Object
axis: 0 or 1. If 0, add column-wise, if 1, add row-wise
{axis: 1}
Returns:
Examples
Comparing a DataFrame with a scalar value:
const dfd = require("danfojs-node")
let data = {"Col1": [10, 45, 56, 10],
"Col2": [23, 20, 10, 24]}
let df = new dfd.DataFrame(data)
let df_rep = df.ne(20)
df_rep.print()╔═══╤═══════════════════╤═══════════════════╗
║ │ Col1 │ Col2 ║
╟───┼───────────────────┼───────────────────╢
║ 0 │ true │ true ║
╟───┼───────────────────┼───────────────────╢
║ 1 │ true │ false ║
╟───┼───────────────────┼───────────────────╢
║ 2 │ true │ true ║
╟───┼───────────────────┼───────────────────╢
║ 3 │ true │ true ║
╚═══╧═══════════════════╧═══════════════════╝Comparing a DataFrame with a Series along the column axis:
Comparing a DataFrame with a DataFrame
Comparing a DataFrame with a JavaScript Array
Last updated
Was this helpful?