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

Rename based_on()? #52

Closed
nalimilan opened this issue Apr 16, 2016 · 9 comments
Closed

Rename based_on()? #52

nalimilan opened this issue Apr 16, 2016 · 9 comments

Comments

@nalimilan
Copy link
Member

As noted in #48, based_on might not be the best name for this operation. It's hard to distinguish from groupby (and doesn't follow the same naming convention with regard to the underscore).

summarize/summarise (like dplyr) might be more explicit. But it's a bit surprising that this operation also allows returning as many rows as in the original data, which is completely different from summarizing.

I wonder whether it couldn't be merged with select, as in SQL. AFAICT select doesn't work on GroupedDataFrame currently, so there would be no conflict.

@nalimilan nalimilan changed the title Rename of based_on? Rename based_on()? Apr 16, 2016
@tshort
Copy link
Contributor

tshort commented Apr 24, 2016

I dislike the name based_on, so I'm good with a change. select would probably work.

@nalimilan
Copy link
Member Author

It looks like that use of select would be more or less consistent with LINQ: https://msdn.microsoft.com/en-us/library/bb386922%28v=vs.110%29.aspx

(Another possibility would be combine, but I'm not sure it's used anywhere else.)

@ararslan
Copy link
Member

+1 for changing the name. based_on isn't very descriptive and IMO is actively confusing given what it actually does.

@sswatson
Copy link

Is there still support for this change? Seems like it would be easy to implement if folks still want to do it.

@nalimilan
Copy link
Member Author

Yes, I think we should merge based_on with select and transform. There's no reason to have a separate function for summarizing: whether the result contains one row per group or multiple rows per group can be determined dynamically based on whether the function returns a row or a data frame. DataFrames does this with combine on current master, and with JuliaData/DataFrames.jl#1601 DataFramesMeta could just call combine, passing it the column names and an anonymous function. You're welcome to experiment with that.

@sswatson
Copy link

sswatson commented Dec 1, 2018

Thanks for the update; I didn't realize just how current this issue is over on the DataFrames front. I'll revisit the issue a bit later, and if it seems some effort would be appreciated to make this happen on DataFramesMeta, I'll give it a try.

@nalimilan
Copy link
Member Author

nalimilan commented Sep 29, 2020

@pdeffebach Is there any reason to keep @based_on now that you implemented @transform?

EDIT: my bad, @based_on is equivalent to @combine, not to @transform. See #167.

@pdeffebach
Copy link
Collaborator

yes, we will definitely rename @based_on to @combine.

@pdeffebach
Copy link
Collaborator

Closed via #167

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

5 participants