danfojs
danfojs copied to clipboard
Fixed loc with one row cause error
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.