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

Method ne

src/danfojs-base/core/frame.ts:1205–1218  ·  view source on GitHub ↗

* Returns "not equal to" of dataframe and other. * @param other DataFrame, Series, Array or Scalar number to compare with * @param options.axis 0 or 1. If 0, add column-wise, if 1, add row-wise * @example * ``` * const df = new DataFrame([[1, 2], [3, 4]], { columns: ['A', 'B

(other: DataFrame | Series | number | Array<number>, options?: { axis?: 0 | 1 })

Source from the content-addressed store, hash-verified

1203 * ```
1204 */
1205 ne(other: DataFrame | Series | number | Array<number>, options?: { axis?: 0 | 1 }): DataFrame {
1206 const { axis } = { axis: 1, ...options }
1207
1208 if (this.$frameIsNotCompactibleForArithmeticOperation()) {
1209 throw Error("TypeError: ne operation is not supported for string dtypes");
1210 }
1211
1212 if ([0, 1].indexOf(axis) === -1) {
1213 throw Error("ParamError: Axis must be 0 or 1");
1214 }
1215
1216 const tensors = this.$getTensorsForArithmeticOperationByAxis(other, axis);
1217 return this.$logicalOps(tensors, "ne")
1218 }
1219
1220 /**
1221 * Returns "less than or equal to" of dataframe and other.

Callers

nothing calls this directly

Tested by

no test coverage detected