MCPcopy Index your code
hub / github.com/javascriptdata/danfojs / convert2DArrayToSeriesArray

Method convert2DArrayToSeriesArray

src/danfojs-base/shared/utils.ts:199–208  ·  view source on GitHub ↗

* Converts a 2D array of array to 1D array for Series Class * @param arr The array to convert.

(arr: ArrayType2D)

Source from the content-addressed store, hash-verified

197 * @param arr The array to convert.
198 */
199 convert2DArrayToSeriesArray(arr: ArrayType2D): Array<string> {
200 const newArr = arr.map((val) => {
201 if (this.isObject(val)) {
202 return JSON.stringify(val)
203 } else {
204 return `${val}`
205 }
206 });
207 return newArr;
208 }
209
210 /**
211 * Replaces all missing values with NaN. Missing values are undefined, Null and Infinity

Callers 3

utils.test.jsFile · 0.80
constructorMethod · 0.80
utils.test.tsFile · 0.80

Calls 2

isObjectMethod · 0.95
mapMethod · 0.65

Tested by

no test coverage detected