Re: Pandas example of groupby

2015-01-26 Thread H. S. Teoh via Digitalmars-d
On Mon, Jan 26, 2015 at 07:59:10PM +, Laeeth Isharc via Digitalmars-d wrote: [...] My question is how much is lost by doing it in two steps (sort, groupby) rather than one. [...] I'm not sure I understand what you mean by lost... I assume you're not talking about data loss, since that's not

Re: Pandas example of groupby

2015-01-26 Thread Andrei Alexandrescu via Digitalmars-d
On 1/26/15 12:31 PM, H. S. Teoh via Digitalmars-d wrote: As far as I know, the current groupBy docs explain quite clearly what it does. I agree. That said, perhaps a change of name would avoid confusion. I like groupBy as we currently define it, it's straight within the spirit of D. However,

Re: Pandas example of groupby

2015-01-26 Thread Laeeth Isharc via Digitalmars-d
Thank you for the thoughtful reply. I meant lost in terms of extra processing time and memory consumption in order to achieve the fairly common use case of a groupby pivot table or pandas style (ie what you get if you sort the data by group and then run D groupby) If you first sort the

Re: Pandas example of groupby

2015-01-26 Thread Dicebot via Digitalmars-d
Don't forget that there is already http://dlang.org/phobos/std_algorithm.html#.group which matches groupBy in this context (only groups consequitive elements). It would be totally awkward to have those named differently (which was why I have suggested to change the name from chunkBy to

Re: Pandas example of groupby

2015-01-26 Thread via Digitalmars-d
On Monday, 26 January 2015 at 20:58:36 UTC, Dicebot wrote: Don't forget that there is already http://dlang.org/phobos/std_algorithm.html#.group which matches groupBy in this context (only groups consequitive elements). It would be totally awkward to have those named differently (which was why

Re: Pandas example of groupby

2015-01-26 Thread Laeeth Isharc via Digitalmars-d
As far as I know, the current groupBy docs explain quite clearly what it does. If you find it still inadequate or unclear, please file bug against it so that we can look into improving the docs. Read the docs now - they are perfect within the context of the style of documentation (and these