FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fixed loc with one row cause error by junduck · Pull Request #682 · javascriptdata/danfojs · GitHub

Fixed loc with one row cause error - #682

Open
junduck wants to merge 1 commit into
javascriptdata:devfrom
junduck:fix-597
Open

Fixed loc with one row cause error#682
junduck wants to merge 1 commit into
javascriptdata:devfrom
junduck:fix-597

Conversation

junduck commented Nov 12, 2025

Copy link
Copy Markdown

Fixes #597

The original implementation directly cast single rows of string to Number, which can result in NaN if rows is literal index.

This fix finds indexOf the row without casting, and if index not found, then tries to cast to Number. This covers both literal index and row number.

No regression reported by test.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

loc with one row cause error

1 participant


Back | FazBrowse Home | New Git URL