MCPcopy Create free account
hub / github.com/tensorflow/tfjs-examples / parseCsv

Function parseCsv

boston-housing/data.js:37–44  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

35 * @returns {Promise.Array<number[]>} Resolves to data with values parsed as floats.
36 */
37const parseCsv = async (data) => {
38 return new Promise(resolve => {
39 data = data.map((row) => {
40 return Object.keys(row).map(key => parseFloat(row[key]));
41 });
42 resolve(data);
43 });
44};
45
46/**
47 * Downloads and returns the csv.

Callers 1

loadCsvFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected