MCPcopy Index your code
hub / github.com/javascriptdata/danfojs / $getDataArraysByAxis

Method $getDataArraysByAxis

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

* Return data aligned to the specified axis. Transposes the array if needed. * @param axis 0 or 1. If 0, column-wise, if 1, row-wise

(axis: number)

Source from the content-addressed store, hash-verified

204 * @param axis 0 or 1. If 0, column-wise, if 1, row-wise
205 */
206 private $getDataArraysByAxis(axis: number): ArrayType2D {
207 if (axis === 1) {
208 return this.values as ArrayType2D
209 } else {
210 let dfValues;
211 if (this.config.isLowMemoryMode) {
212 dfValues = utils.transposeArray(this.values) as ArrayType2D
213 } else {
214 dfValues = this.$dataIncolumnFormat as ArrayType2D
215 }
216 return dfValues
217 }
218 }
219
220 /*
221 * checks if DataFrame is compactible for arithmetic operation

Callers 2

nUniqueMethod · 0.95

Calls 1

transposeArrayMethod · 0.80

Tested by

no test coverage detected