The test3.csv includes one column with 33 numbers. I would like to reshape the one column to 11 rows and 3 columns. And then, I want to save as new ascii file with the rows and columns like attached image.
First try:
import csv
f = open('test3.csv')
csv_f = csv.reader(f)
for row in csv_f:
print row /* The result is
The result is:
['0.000016'] ['0.000045'] ['0.000062'] ['0.000063'] ['0.000063'] ['0.000063']... **[' ']** means string?
Second try:
f = open('test3.csv')
csv_f = csv.reader(f)
for row in csv_f:
print row[0]
The result is:
0.000016 0.000045 0.000062 0.000063 0.000063 0.000063 ...I think they are number.
Third try:
import csv
import numpy as np
f = open('test3.csv')
csv_f = csv.reader(f)
a1 = []
for row in csv_f:
a1.append(row[0])
print a1
The result is:
['0.000016', '0.000045', '0.000062', '0.000063', '0.000063', '0.000063',...].
Actually I want to this result as ascii file like: