danfojs
danfojs copied to clipboard
Error: DtypeError: Dtype "undefined" not supported
import { readCSV } from 'danfojs-node';
const ndf = await readCSV('/Users/ellison/Desktop/file.csv');
ndf.print();
ndf.loc({ rows: [1], columns: ['Variable 1'] }).print(); // error

import { readCSV } from 'danfojs-node';
const ndf = await readCSV('/Users/ellison/Desktop/file.csv');
console.log(ndf.columns[0].charAt(0)); // print: empty string
console.log(ndf.columns[0].charAt(1)); // print: "V"
@risenW The results from ndf.columns contain spaces in front of each item, which is the root cause of this problem.(There are no spaces in the contents of the original csv file)