categorizing items in a list with python

Posted by jtc99 on Stack Overflow See other posts from Stack Overflow or by jtc99
Published on 2012-10-03T15:27:30Z Indexed on 2012/10/03 15:37 UTC
Read the original article Hit count: 122

Filed under:
|

Just as a heads up, I'm really new to python.

Currently I have a list of 110,000 donors in Excel. One of the pieces of information they give to us is their occupation. I would like to condense this list down to say 10 or 20 categories that I define.

Normally I would just chug through this, going line by line, but since I have to do this for a years worth of data, I don't really have the time to do a line by line of 1,000,000+ rows.

Is there anyway to define my 10 or 20 categories and then have python sort it out from there?

© Stack Overflow or respective owner

Related posts about python

Related posts about list