#1
|
|||
|
|||
csv reading
I am using this command to import a csv file
Code:
temp = [[float(val) for val in row] for row in csv.reader(file('data.csv','rUb')) ] |
#2
|
|||
|
|||
Hi,
Try the following code to transpose the list: Code:
def transpose(m): return [[m[y][x] for y in range(len(m))]for x in range(len(m[0]))] temp = transpose(temp) |
Thread Tools | |
Display Modes | Rate This Thread |
|
|