Open
Description
Describe the bug
When using readCSV
and readExcel
, with a CSV file that contains zero-leading numbers, the leading zeros are not preserved even after setting dtypes to string
To Reproduce
Steps to reproduce the behavior:
- Prepare the following
.csv
file:
./sample.csv
codes
012345
067890
import { readCSV, toJSON } from "danfojs";
const df = await readCSV("./sample.csv", {
frameConfig: {
dtypes: ["string"],
},
});
const data = toJSON(df);
console.log(data) // [{ codes: 12345 }, { codes: 67890 }]
Expected behavior
Leading-zeros should be retained if dtypes is string
Desktop (please complete the following information):
- OS: Windos 10
- Browser Chrome
- Version 1.1.1
Metadata
Metadata
Assignees
Labels
No labels