Skip to content
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

Drop_nil for Series missing #715

Closed
sehHeiden opened this issue Sep 26, 2023 · 7 comments
Closed

Drop_nil for Series missing #715

sehHeiden opened this issue Sep 26, 2023 · 7 comments

Comments

@sehHeiden
Copy link

While the funtion drop_nil/2 exists for DataFrames, it is missing for Series.
Could you be so kind to ad it?

@josevalim
Copy link
Member

PRs welcome. Note this function is not supported by lazy data frames.

@kimjoaoun
Copy link
Contributor

Can I take this one, @josevalim?
Ill be opening a PR that closes #554 in a few days, after that I can work on this one.

@josevalim
Copy link
Member

Yes, definitely!

@cigrainger
Copy link
Member

cigrainger commented Oct 17, 2023

Do we need this? Couldn't one just filter with Series.mask/2? e.g. Series.mask(s, Series.is_not_nil(s))? One of the biggest complaints I hear about pandas is that there are so many ways to do the same thing. I know that dplyr has specifically avoided many redundant convenience functions like this to stay parsimonious. Is there a performance benefit?

@cigrainger
Copy link
Member

I'll add: one of the reasons I included DataFrame.drop_nil/2 originally is because it's not trivial to do for a dataframe with DataFrame.filter/2 (or wasn't before we had across). This is trivial to do for a series.

@sehHeiden
Copy link
Author

sehHeiden commented Oct 17, 2023 via email

@josevalim
Copy link
Member

Closing as you can do Series.filter(s, _ != nil) in main.

@josevalim josevalim closed this as not planned Won't fix, can't repro, duplicate, stale Nov 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants