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

Method le

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

* Returns "less than or 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: [

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

Source from the content-addressed store, hash-verified

1239 * ```
1240 */
1241 le(other: DataFrame | Series | number | Array<number>, options?: { axis?: 0 | 1 }): DataFrame {
1242 const { axis } = { axis: 1, ...options }
1243
1244 if (this.$frameIsNotCompactibleForArithmeticOperation()) {
1245 throw Error("TypeError: le operation is not supported for string dtypes");
1246 }
1247
1248 if ([0, 1].indexOf(axis) === -1) {
1249 throw Error("ParamError: Axis must be 0 or 1");
1250 }
1251
1252 const tensors = this.$getTensorsForArithmeticOperationByAxis(other, axis);
1253 return this.$logicalOps(tensors, "le")
1254 }
1255
1256 /**
1257 * Returns "greater than or equal to" between dataframe and other.

Callers

nothing calls this directly

Tested by

no test coverage detected