with zipfile.ZipFile(zipped_file, 'w') as f:
    for i, file in enumerate(files):
        f.writestr('{}.csv'.format(i), file.getvalue())
Sending multiple .CSV files to .ZIP without storing to disk in Python