On 2012-12-05, Nick Mellor <thebalance...@gmail.com> wrote:
> Neil,
>
> Further down the data, found another edge case:
>
> "Spring ONION from QLD"
>
> Following the spec, the whole line should be description
> (description starts at first word that is not all caps.) This
> case breaks the latest groupby.

A-ha! I did check your samples for the case of an empty product
name and not find any started to think it couldn't happen.

Change

   if prod or k:

to

   if desc or prod or k:

If this data file gets any weirder, let me know. ;)

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

Reply via email to