I’m having trouble getting my python data to write as csvs, either using pylab’s rec2csv or using csv.writer. I’m having particular trouble with rec.arrays that are of width 1 with rec2csv. What I would like to do is have each element in an array (or list) as a column in a csv file. For example, using any of these data types:
data = np.random.uniform(.5, .2, 1000)
data.tolist()
data = np.core.records.fromarrays(data)
It would also be quite helpful if I could change the name of the lat variable only.
I’m not familiar with rec2csv or some of the other (numpy? scipy?) stuff you’re using, but here is a simple example with the standard csv module: