Sophie Courtemanche-Martel01/26/2022, 4:09 PM
stream = io.BytesIO(data.encode()) AttributeError: 'tuple' object has no attribute 'encode'
Abdou Seck01/26/2022, 4:32 PM
Then you can pass
import csv, io with io.StringIO() as fh: writer = csv.writer(fh, lineterminator='\n', quotechar='"') writer.writerows(data) fh.seek(0, 0) contents_for_s3upload = fh.read()
Abdou Seck01/26/2022, 4:34 PM
Sophie Courtemanche-Martel01/26/2022, 4:35 PM
but now I have to make sure that I can actually read the results back in the appropriate format!