-
Notifications
You must be signed in to change notification settings - Fork 326
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
Add groupby to SArray #303
Comments
What would the api for this look like? Sketch objects have a lot of the aggregations you mentioned for a single |
Well I think it would just be something like this:
What are your thoughts? I guess we could add them all as functions rather than parameters to groupby. Perhaps it would be better to have Interesting, I didn't realize these were already in the sketch object. That seems like even more of a reason to add it SArray (i.e. for consistency). |
So directly on I think that grouping operations only make sense when there are multiple series involved and you need to group one by the other. Otherwise it's just an aggregator, not really a grouper. What do you think? Was there something particular that you were trying to do that made you want the |
The main use case I'd like is the Also I think it would be good for the SArray interface to be a similar as reasonably possible to the SFrame interface. I'm a big fan of consistency where it makes sense. The values returned by |
SFrame has a groupby method but SArrays does not. I think having a groupby method for SArray would be useful for several operators: AVG, MEAN, COUNT, COUNT_DISTINCT, DISTINCT, FREQ_COUNT, MAX, MEAN, MIN, QUANTILE, STD, STDV, SUM, VAR, VARIANCE.
Doing this might be relatively easy; hopefully we can just reuse the functionality already in SArray. Aggregator code will probably need to change since I don't think it every makes sense for an aggregator to take any parameters if it's being used in an SArray groupby.
The text was updated successfully, but these errors were encountered: