Trying to read several images from a local folder and save them to csv using numpy.savetxt. Using following code
filelist = glob.glob('Filepath/*.png')
x = np.array([np.array(Image.open(fname)) for fname in filelist])
print(x.shape)
np.savetxt('csvfile.csv', x,fmt='%s')
Want this code to save one image as one row in the csv in one column. But this is storing array in 2 columns and not seperating the array to new line. As in the image second array is stored just after the first one and not to the new row.
[252 252 252 252 252 252 252 252 252 252 252 252 252 252 252 252 252 252 252 252 252 252 252 252 252] [252 252 252 252 252 252 252 252 252 252 252 252 252 252 252 252 252 252...
csvis text format, it would be more useful if you post it as text content. See this