Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Conversation

risenW
Copy link
Member

No description provided.

@risenWrisenW linked an issueApr 2, 2025 that may beclosed by this pull request
@risenWrisenW requested a review fromCopilotApril 2, 2025 15:21
Copy link

@CopilotCopilotAI left a 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.

FileDescription
src/danfojs-node/test/io/csv.reader.test.tsAdded tests to ensure correct behavior when using the "string" dtype.
src/danfojs-browser/tests/io/csv.reader.test.jsAdded corresponding tests for browser CSV parsing.
src/danfojs-base/io/node/io.csv.tsUpdated CSV parsing logic to conditionally disable dynamic typing and set delimiter.
src/danfojs-base/io/browser/io.csv.tsUpdated 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);

@risenWrisenW merged commit90aa135 intodevApr 2, 2025
2 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

Copilot code reviewCopilotCopilot left review comments

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Leading Zeros Are Removed After dtypes Set to "string"
1 participant
@risenW

[8]ページ先頭

©2009-2025 Movatter.jp