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

Function parseCsv

website-phishing/utils.js:30–37  ·  view source on GitHub ↗

* * @param {Array } data Downloaded data. * * @returns {Promise.Array } Resolves to data with values parsed as * floats.

(data)

Source from the content-addressed store, hash-verified

28 * floats.
29 */
30async function parseCsv (data) {
31 return new Promise(resolve => {
32 data = data.map((row) => {
33 return Object.keys(row).sort().map(key => parseFloat(row[key]));
34 });
35 resolve(data);
36 });
37};
38
39/**
40 * Downloads and returns the csv.

Callers 1

loadCsvFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected