Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork217
fix dtypes not used on csv parse#657
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
fix dtypes not used on csv parse#657
Uh oh!
There was an error while loading.Please reload this page.
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Pull Request Overview
This PR fixes the issue where the configured dtypes were not being applied during CSV parsing, resulting in unwanted conversion of certain values such as leading zeros.
- Updated tests in both Node and browser environments to validate the preservation of leading zeros when dtype is set to "string".
- Modified the CSV parsing logic in both Node and browser implementations to conditionally disable dynamic typing when dtypes include "string", and explicitly set the delimiter.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
File | Description |
---|---|
src/danfojs-node/test/io/csv.reader.test.ts | Added tests to ensure correct behavior when using the "string" dtype. |
src/danfojs-browser/tests/io/csv.reader.test.js | Added corresponding tests for browser CSV parsing. |
src/danfojs-base/io/node/io.csv.ts | Updated CSV parsing logic to conditionally disable dynamic typing and set delimiter. |
src/danfojs-base/io/browser/io.csv.ts | Updated CSV parsing logic for browser to conditionally disable dynamic typing and set delimiter. |
Comments suppressed due to low confidence (1)
src/danfojs-node/test/io/csv.reader.test.ts:136
- [nitpick] Consider refactoring the file cleanup logic by using a finally block instead of duplicating fs.unlinkSync in both the try and catch blocks to ensure consistent cleanup.
fs.unlinkSync(filePath);
90aa135
intodevUh oh!
There was an error while loading.Please reload this page.
No description provided.