- Notifications
You must be signed in to change notification settings - Fork1
🔨 A simple CSV to arrays in array (matrix) parser.
License
NotificationsYou must be signed in to change notification settings
javascript-machine-learning/csv-to-array-matrix
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
A simple CVS to Matrix parser - reads a CSV file, outputs an arrays in array (Matrix).
npm install csv-to-array-matrix
import csvToMatrix from 'csv-to-array-matrix';csvToMatrix('./src/data.csv', callback);function callback(data) { console.log(data);}Transforming into aMatrix object with math.js.
import math from 'mathjs';import csvToMatrix from 'csv-to-array-matrix';csvToMatrix(pathToFile, callback);function callback(data) { const matrix = math.matrix(data);}The default delimiter is ';', but you use a different one.
import csvToMatrix from 'csv-to-array-matrix';csvToMatrix('./src/data.csv', callback, ',');function callback(data) { console.log(data);}About
🔨 A simple CSV to arrays in array (matrix) parser.
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
No releases published
Packages0
No packages published
Uh oh!
There was an error while loading.Please reload this page.