Closed fkgruber closed 8 months ago
%in%
is nothing but just the is.element()
function in R
. So with datar
, we have is_element()
. You can find an example on this page: https://pwwang.github.io/datar/notebooks/base/
from datar.all import filter_, f,pull, is_element
from datar.data import iris
tst=iris >> filter_(is_element(f.Species, ["setosa","versicolor"]))
print(tst.Species.unique())
is_in
is an alias of is_element
.
Question about datar
In datar how to filter on a vector of possible values. For example, in R I would do:
If I try something like this in datar using
in
instead of%in%
I get:Is there something similar to %in% in datar?