On Jul 19, 1:56 pm, Paul Rubin <no.em...@nospam.invalid> wrote: > "larry.mart...@gmail.com" <larry.mart...@gmail.com> writes: > > You can't do a len on the iterator that is returned from groupby, and > > I've tried to do something with imap or defaultdict, but I'm not > > getting anywhere. I guess I can just make 2 passes through the data, > > the first time getting counts. Or am I missing something about how > > groupby works? > > I posted another reply to your other message, which reached me earlier. > If you're still stuck, post again, though I probably won't be able to > reply til tomorrow or the next day.
I really appreciate the offer, but I'm going to go with MRAB's solution. It works, and I understand it ;-) -- http://mail.python.org/mailman/listinfo/python-list