Skip to content

Bug: readCSV by default returns data as all String #354

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
risenW opened this issue Jan 16, 2022 · 0 comments
Closed

Bug: readCSV by default returns data as all String #354

risenW opened this issue Jan 16, 2022 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@risenW
Copy link
Member

risenW commented Jan 16, 2022

Here's an example:

let dfd = require('danfojs-node')
let df = dfd.readCSV('http://scikitjs.org/data/iris.csv')
console.log(df['target']) // ['0.0', '0.0', ..., '1.0'] instead of [0, 0, 0, 1, 1]

This is because we use Papaparse to load CSV, and by default, the dynamicTyping is set to false. To fix this we need to set dynamicTyping to true by fault.

@risenW risenW self-assigned this Jan 16, 2022
@risenW risenW added the bug Something isn't working label Jan 16, 2022
@risenW risenW closed this as completed in d0cd7b1 Jan 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant