-
Notifications
You must be signed in to change notification settings - Fork 111
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
Revisit Series.mask
vs. Series.filter
#726
Comments
I agree! I was mostly focused on making the DataFrame and Series APIs similar. Polars as a few
Explorer OTOH introduced the concept of a
So if Explorer is to have a Here are the options I see:
My first choice is 3. Assuming the hack isn't terrible, it helps newcomers find the functionality and keeps the meanings consistent. We can also document that My second choice is 1. I think I favor consistency over newcomer surprise. We could possibly add an example to the docs to help newcomers find My last choice is 2. I think |
Honestly, an implementation of This would also allow us to introduce |
Yeah I'd love to use
For I'm happy to try for a |
I would start with Please go ahead! |
Oh of course. I'll think about it, but nothing clean comes to immediately to mind. |
Well that is a SUPER elegant solution. What a great idea. I'm in full support. Edit: to clarify I mean the idea of converting to a df, applying functions, and converting back to a series. |
What would |
@cigrainger that was what i thought but i guess it doesn't make much sense since we would only arrange ourselves? |
Exactly, I think it would just be a sort. Though maybe you could provide a sorter? E.g. on strings you could sort by Edit: So in this case, in the background you're basically doing: |
Correct. So I guess we could have some use cases? |
Definitely. |
We will need to decide on the naming though. Today we have |
Good question. I'm struggling to disentangle the macro aspect from the motivation to introduce |
That's a good discussion. We don't need |
I think they do apply. We have a direction selector in |
Thought: for the macro versions, what if we did like Ecto and had them provide the column as an argument? E.g. we make a dates =
[~D[2023-11-01], ~D[2023-11-02], ~D[2023-11-03]]
|> S.from_list()
|> S.filter(date, date > ^~D[2023-11-01]) |
That would work but, at the same time, everyone is using pipelines to transfrom series today anyway, so requesting a pipeline inside the anonymous function is not that bad. |
I think #728 closed this issue. We discussed several other additions to |
Yeah! |
Description
This discussion came up in another issue. I'm breaking it out into its own issue so it can be tracked independently.
Show/hide recap
@cigrainger:
@josevalim
@billylanchantin
@josevalim
The text was updated successfully, but these errors were encountered: