Package Exports
- reader-csv
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (reader-csv) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
reader-csv
Installation
yarn add reader-csvread( path, skip );
Parameters
path- path to csv fileskip- array of columns you want to skip by name
Returns an object containing
data- array of objects i.e. your dataminMax- object containing the min and max values for each column, good for data normalization
Example Usage
timestamp, high, low
1563494520000, 10660.0,10680.15
1563494460000, 10680.15,10680.19
1563494400000, 10680.19,10680.15
1563494340000, 10660.0,10680.15const csv = require('reader-csv');
(async()=>{
let results = await csv.read('./your-file.csv', ['timestamp']);
// results = {data, minMax}
// results.data = [{high:10660.0, low:10680.15},...]
// results.minMax = {high: {min: 10660.0, max: 10680.19} low:{...} }
})()