danfojs icon indicating copy to clipboard operation
danfojs copied to clipboard

Compare Date's or Strings with boolOps

Open nholmes3 opened this issue 3 years ago • 2 comments

Is your feature request related to a problem? Please describe. Currently, Series.prototype.boolOps cannot perform any comparisons on Strings or Dates other than ["eq", "ne"] operators for Strings.

It seems like a decision has been made by the developers to explicitly not allow these types of comparisons from taking place.

Describe the solution you'd like Correct use of comparison logic should be the responsibility of the user. The native comparison operators used by the logic in boolOps are perfectly capable of performing accurate comparisons with Strings and Dates. I do not believe that users should be disallowed from comparing strings or dates directly.

nholmes3 avatar Oct 04 '22 18:10 nholmes3

@nholmes3 are you saying that lt, gt , le and ge are not working?

steveoni avatar Nov 22 '22 12:11 steveoni

@nholmes3 are you saying that lt, gt , le and ge are not working?

I am saying that those operators don't work for Strings and Dates because there is a conditional that explicitly checks for a string type and disallows them. My proposal is that Strings and Dates should be able to be compared by the native operators

nholmes3 avatar Nov 22 '22 17:11 nholmes3