danfojs
danfojs copied to clipboard
`DataFrame.apply` function output is inconsistent
Describe the bug
DataFrame.apply is supposed to return Series however it returns a DataFrame if the original DataFrame contains no rows.
To Reproduce Steps to reproduce the behavior:
- Go to https://codesandbox.io/s/sweet-voice-w2n0bx?file=/src/index.js
- The code should run on its own.
- Open the console and notice the outputs.
- When
DataFramecontains rows then$isSeriesis true else it is false.
Expected behavior
apply should always return a Series.
Additional context Using version 1.1.1 of Danfo JS.