-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds Series.in/2
function
#420
Conversation
Yeah, this is a good question. To be honest, I am not the biggest fan of the name. What does dplyr call it? It feels like |
In R we don't have this operation in Note: Pandas has pd.Series.isin. |
I see. So I think we should simply call it |
Note that, if we call it
and
The callback will be |
Would not it be too similar to |
I think that's the idea! Then it will automatically work in Explorer.Query as: |
Given that this is failing for 1.13... should we go ahead and bump Explorer to minimum 1.14 for the next release? I'm surprised we're not already doing that. |
@cigrainger fixing for v1.13 should be easy and mostly a matter of using |
Hm okay. Jumping into this... it's a vectorised op right? So what we get back is a boolean series where each element is true if in the right and false if in the left? I like In terms of the docstring: @doc """
Checks if each element of the series in the left exists in the series in the right, returning a boolean mask.
## Examples
iex> left = Explorer.Series.from_list([1, 2, 3])
iex> right = Explorer.Series.from_list([1, 2])
iex> Series.in(left, right)
#Explorer.Series<
Polars[3]
boolean [true, true, false]
>
""" |
fb10298
to
75070aa
Compare
75070aa
to
18c1550
Compare
💚 💙 💜 💛 ❤️ |
This PR closes #273.
It creates the function
Explorer.Series.in/2
that uses Polars' IsIn trait to check if values from a list are contained in a Series.I really don't know how to describe the function in the docstring, can someone help me?