(options?: { inplace?: boolean })
| 1537 | */ |
| 1538 | abs(options?: { inplace?: boolean }): DataFrame |
| 1539 | abs(options?: { inplace?: boolean }): DataFrame | void { |
| 1540 | const { inplace } = { inplace: false, ...options } |
| 1541 | |
| 1542 | const newData = (this.values as number[][]).map(arr => arr.map(val => Math.abs(val))) |
| 1543 | if (inplace) { |
| 1544 | this.$setValues(newData) |
| 1545 | } else { |
| 1546 | return new DataFrame(newData, { |
| 1547 | index: [...this.index], |
| 1548 | columns: [...this.columns], |
| 1549 | dtypes: [...this.dtypes], |
| 1550 | config: { ...this.config } |
| 1551 | }) |
| 1552 | } |
| 1553 | } |
| 1554 | |
| 1555 | /** |
| 1556 | * Rounds all element in the DataFrame to specified number of decimal places. |
nothing calls this directly
no test coverage detected