(other: DataFrame | Series | number[] | number, options?: { axis?: 0 | 1, inplace?: boolean })
| 644 | */ |
| 645 | sub(other: DataFrame | Series | number[] | number, options?: { axis?: 0 | 1, inplace?: boolean }): DataFrame |
| 646 | sub(other: DataFrame | Series | number[] | number, options?: { axis?: 0 | 1, inplace?: boolean }): DataFrame | void { |
| 647 | const { inplace, axis } = { inplace: false, axis: 1, ...options } |
| 648 | |
| 649 | if (this.$frameIsNotCompactibleForArithmeticOperation()) { |
| 650 | throw Error("TypeError: sub operation is not supported for string dtypes"); |
| 651 | } |
| 652 | |
| 653 | if ([0, 1].indexOf(axis) === -1) { |
| 654 | throw Error("ParamError: Axis must be 0 or 1"); |
| 655 | } |
| 656 | |
| 657 | const tensors = this.$getTensorsForArithmeticOperationByAxis(other, axis); |
| 658 | return this.$MathOps(tensors, "sub", inplace) |
| 659 | |
| 660 | |
| 661 | } |
| 662 | /** |
| 663 | * Return multiplciation between DataFrame and other. |
| 664 | * @param other DataFrame, Series, Array or Scalar number to multiply with. |
nothing calls this directly
no test coverage detected