danfojs icon indicating copy to clipboard operation
danfojs copied to clipboard

Missing Series type arg in .loc

Open khusmann opened this issue 2 years ago • 0 comments

Describe the bug Series.loc can accept a series of bools, but this is not reflected in the type signature.

This shows a type error in VSCode:

const dfd = require("danfojs-node")


let s = new dfd.Series([12, 34, 2.2, 2, 30, 30, 2.1, 7])
s.loc(s.gt(20)).print()

Error:

Argument of type 'Series' is not assignable to parameter of type '(string | number | boolean)[]'

Expected behavior No type errors :)

khusmann avatar Nov 01 '23 00:11 khusmann