Open fengyuchengdu opened 3 hours ago
Thanks for reporting this, can you give some data to reproduce it? In my test, it works well.
$ cat names.csv | csvtk filter2 -f '$id > 1 && $first_name == "Robert"' | csvtk pretty
[WARN] row 5: Value 'NA' cannot be used with the comparator '>', it is not a number
id first_name last_name username
-- ---------- --------- --------
4 Robert Griesemer gri
I did some test and seems that the order of column matters in 0.31.1 now. Swapping columns id and first_name to see if it still works.
csvtk filter2 -f '$B == 0 && $A >= 20' example.csv
strain B A
GCA_000149305.1 0 77.7364887
csvtk filter2 -f '$A >= 20 && $B == 0' example.csv strain B A
I see, it's a bug, I'll fix it soon.
That's great. Thank you!
It seems that this update of filter2 broke something during interpreting the logic expression "&&", whereas csvtk 0.31.0 worked well on the same dataset.