On 2012-12-05, Ian Kelly <ian.g.ke...@gmail.com> wrote:
> On Wed, Dec 5, 2012 at 7:34 AM, Neil Cerutti <ne...@norwich.edu> wrote:
>> Well, shoot! Then this is a job for groupby, not takewhile.
>
> The problem with groupby is that you can't just limit it to two groups.
>
>>>> prod_desc("CAPSICUM RED fresh from QLD")
> ['QLD', 'fresh from']
>
> Once you've got a false key from the groupby, you would need to
> pretend that any subsequent groups are part of the false group
> and tack them on.

Whoops! Yep, that was from the very beginning of the thread.

-- 
Neil Cerutti
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to