s = ','.join(itertools.chain(dataset)) + '\n'
newfile = 'export.csv'
f = open(newfile, 'w')
f.write(s)
numpy.savetxt(f, numpy.transpose(datastack), delimiter=', ')
f.close()
Writing csv header removes data from numpy array written below