* Returns the shape of the NDFrame. Shape is determined by [row length, column length]
()
| 342 | * Returns the shape of the NDFrame. Shape is determined by [row length, column length] |
| 343 | */ |
| 344 | get shape(): Array<number> { |
| 345 | if (this.$data.length === 0) { |
| 346 | if (this.$columns.length === 0) return [0, 0]; |
| 347 | else return [0, this.$columns.length]; |
| 348 | } |
| 349 | if (this.$isSeries) { |
| 350 | return [this.$data.length, 1]; |
| 351 | } else { |
| 352 | const rowLen = (this.$data).length |
| 353 | const colLen = (this.$data[0] as []).length |
| 354 | return [rowLen, colLen] |
| 355 | } |
| 356 | |
| 357 | } |
| 358 | |
| 359 | /** |
| 360 | * Returns the underlying data in Array format. |
nothing calls this directly
no outgoing calls
no test coverage detected