Converting a .csv.gz to .csv in Python 2.7
Converting a .csv.gz to .csv in Python 2.7 I have read the documentation and a few additional posts on SO and other various places, but I can't quite figure out this concept: When you call csvFilename = gzip.open(filename, 'rb') then reader = csv.reader(open(csvFilename)) , is that reader not a valid csv file? csvFilename = gzip.open(filename, 'rb') reader = csv.reader(open(csvFilename)) reader I am trying to solve the problem outlined below, and am getting a coercing to Unicode: need string or buffer, GzipFile found error on line 41 and 7 (highlighted below), leading me to believe that the gzip.open and csv.reader do not work as I had previously thought. coercing to Unicode: need string or buffer, GzipFile found Problem I am trying to solve I am trying to take a results.csv.gz and convert it to a results.csv so that I can turn the results.csv into a python dictionary and then combine it with another python dictionary. results.csv.gz results.csv results.csv Fi...
