I have a Python simple list like this one:
a = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
I want to save it in a csv file that looks like this:
1,2,3,4,5,6,7,8
9,10,11,12,13,14,15,16
How can I do that? I tried:
np.savetxt('fname.csv', bbox_form, fmt='%d')
But I don't know how to write a new line only after 8 values.
a = np.reshape(a, (-1, 8))do? If it doesn't throw errors, save that.numpy?