head for grouped data - looking for best practice
Harald Massa
cpl.19.ghum at spamgourmet.com
Sat Mar 12 16:31:12 EST 2005
Steve,
> Why don't you just pass a slice to itemgetter?
py> for key, bereich in groupby(eingabe, itemgetter(slice(0, 2))):
WHOW, that is great! that makes it really simple, just have to structure
the SQL to make a real "cut first, serve first" structure.
Thanks to all who helped!
also the "function factory function" bei Dietz was very helpfull; and
Peters classes looked really impressive!
Thanks again... now my code will be even clearer.
Harald
More information about the Python-list
mailing list