I tried
with zipfile.ZipFile(\"5.csv.zip\", \"r\") as zfile:
for name in zfile.namelist():
with zfile.open(name, \'rU\') as readFile:
The reason why you're seeing that error is because you are trying to mix bytes with unicode. The argument to split
must also be byte-string:
>>> line = b'$0.0\t1822\t1\t1\t1\n'
>>> line.split(b'\t')
[b'$0.0', b'1822', b'1', b'1', b'1\n']
To get a unicode string, use decode:
>>> line.decode('utf-8')
'$0.0\t1822\t1\t1\t1\n'