Describe the bug
DataFrame.apply removes all values of type object. It seems to accept only string or numbers.
To Reproduce
Steps to reproduce the behavior:
- Go to https://codesandbox.io/s/summer-forest-xzq2rq?file=/src/index.js
- Open the console.
Expected behavior
The callback should be called with non-zero length array.
Danfojs version:
Additional context
This happens since apply internally removes all values which are "empty". However, the "empty" logic is weird (
|
return value === undefined || value === null || (isNaN(value as any) && typeof value !== "string"); |
) and it removes all values if they are not string or number. In my case I have JS objects which internally have data.
Describe the bug
DataFrame.applyremoves all values of type object. It seems to accept only string or numbers.To Reproduce
Steps to reproduce the behavior:
Expected behavior
The callback should be called with non-zero length array.
Danfojs version:
Additional context
This happens since
applyinternally removes all values which are "empty". However, the "empty" logic is weird (danfojs/src/danfojs-base/shared/utils.ts
Line 94 in bdf0a24