danfojs icon indicating copy to clipboard operation
danfojs copied to clipboard

Fixed loc with one row cause error

Open junduck opened this issue 3 months ago • 0 comments

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.

junduck avatar Nov 12 '25 16:11 junduck