sort by column a csv file case insensitive

2012-04-16 Thread Lee Chaplin
Well, if I have a file like this one: EWIENER, edit, edgard, evan, erick, elliott,

Re: sort by column a csv file case insensitive

2012-04-15 Thread Peter Otten
Lee Chaplin wrote: > Hi all, > > I am trying to sort, in place, by column, a csv file AND sort it case > insensitive. > I was trying something like this, with no success: > > import csv > import operator > > def sortcsvbyfield(csvfilename, columnnumber): > with open(csvfilename, 'rb') as f: >

Re: sort by column a csv file case insensitive

2012-04-15 Thread Dave Angel
On 04/16/2012 01:11 AM, Lee Chaplin wrote: > Hi all, > > I am trying to sort, in place, by column, a csv file AND sort it case > insensitive. > I was trying something like this, with no success: Could you perhaps qualify that "no success" bit? Do you mean it didn't output a file, or that the file

sort by column a csv file case insensitive

2012-04-15 Thread Lee Chaplin
Hi all, I am trying to sort, in place, by column, a csv file AND sort it case insensitive. I was trying something like this, with no success: import csv import operator def sortcsvbyfield(csvfilename, columnnumber): with open(csvfilename, 'rb') as f: readit = csv.reader(f) thedata = li