quick and smart way for parsing a CSV file?

John Hunter jdhunter at ace.bsd.uchicago.edu
Thu Sep 4 21:03:12 CEST 2003


>>>>> "Hank" == Hank  <soundwave56 at yahoo.ca> writes:

    Hank> Hi, I have a CSV file from excel that looks like this
    Hank> (simplified):

    Hank> name,description,type1,type2,name,filename test1,this is a
    Hank> test,0.000,1.000,, test2,another
    Hank> test,1.000,0.000,newname,filename test3,this is a
    Hank> test,0.000,1.000,, test4,this is a test,0.000,1.000,,
    Hank> test5,this is a test,0.000,1.000,, test6,this is a
    Hank> test,0.000,1.000,,

I posted some code recently to parse CSV into a dictionary where you
can extract rows or columns by key or index number.  It's not exactly
what you asked for, but might help

http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&safe=off&selm=mailman.1058882602.32583.python-list%40python.org&rnum=4

John Hunter





More information about the Python-list mailing list