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

Method gt

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

* Returns "greater than" 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

1131 * ```
1132 */
1133 gt(other: DataFrame | Series | number | Array<number>, options?: { axis?: 0 | 1 }): DataFrame {
1134 const { axis } = { axis: 1, ...options }
1135
1136 if (this.$frameIsNotCompactibleForArithmeticOperation()) {
1137 throw Error("TypeError: gt operation is not supported for string dtypes");
1138 }
1139
1140 if ([0, 1].indexOf(axis) === -1) {
1141 throw Error("ParamError: Axis must be 0 or 1");
1142 }
1143
1144 const tensors = this.$getTensorsForArithmeticOperationByAxis(other, axis);
1145 return this.$logicalOps(tensors, "gt")
1146 }
1147
1148 /**
1149 * Returns "equals to" of dataframe and other.

Callers

nothing calls this directly

Tested by

no test coverage detected