def process_csv(f):
reader = unicodecsv.DictReader(f, encoding=_ENCODING)<EOL>for row in reader:<EOL><INDENT>month, year = parse_month_year(row['<STR_LIT>'])<EOL>yield OrderedDict([<EOL>('<STR_LIT>', row['<STR_LIT>']),<EOL>('<STR_LIT>', row['<STR_LIT>']),<EOL>('<STR_LIT>', month),<EOL>('<STR_LIT>', year),<EOL>('<STR_LIT:date>', datetime.date(year, month, <NUM_LIT:1>)),<EOL>('<STR_LIT>', parse_price(row['<STR_LIT>'])),<EOL>('<STR_LIT>', parse_lot_name(row['<STR_LIT>'])),<EOL>('<STR_LIT>', parse_customer_sector(row['<STR_LIT>'])),<EOL>('<STR_LIT>', parse_sme_or_large(row['<STR_LIT>'])),<EOL>])<EOL><DEDENT>
Take a file-like object and yield OrderedDicts to be inserted into raw
spending database.