danfojs
danfojs copied to clipboard
`isEmpty()` throws when used on a `BigInt` type
Problem description
isEmpty() throws a Cannot convert a BigInt value to a number.
Related code
https://github.com/javascriptdata/danfojs/blob/f272a7eac7fb0a13be313f15e72d3506136093b6/src/danfojs-base/shared/utils.ts#L93-L95
Solution
Using isNaN(Number(value)) fixes the issue.
Discussion
Looking at the other isNaN() calls in said file it looks like some places are using Number(value) while some others don't.
I suspect some other methods would throw in the same way.