itertools.groupby

7stud bbxx789_05ss at yahoo.com
Sun May 27 13:49:06 EDT 2007


On May 27, 11:28 am, Steve Howell <showel... at yahoo.com> wrote:
> --- 7stud <bbxx789_0... at yahoo.com> wrote:
> > Bejeezus.  The description of groupby in the docs is
> > a poster child
> > for why the docs need user comments.  Can someone
> > explain to me in
> > what sense the name 'uniquekeys' is used this
> > example: [...]
>
> The groupby method has its uses, but it's behavior is
> going to be very surprising to anybody that has used
> the "group by" syntax of SQL, because Python's groupby
> method will repeat groups if your data is not sorted,
> whereas SQL has the luxury of (knowing that it's)
> working with a finite data set, so it can provide the
> more convenient semantics.
>
> ___________________________________________________________________________ _________You snooze, you lose. Get messages ASAP with AutoCheck
> in the all-new Yahoo! Mail Beta.http://advision.webevents.yahoo.com/mailbeta/newmail_html.html

> The groupby method has its uses

I'd settle for a simple explanation of what it does in python.




More information about the Python-list mailing list