Suppose I have a csv file containing five columns each having 200 data. I have used these two codes but either of those storing row wise data. Can anyone tell me how to store each column as an individual array in python directly form .csv file?
Code1:
import csv
with open("figure1_plotdata.csv") as f:
reader = csv.reader(f)
next(reader)
data = [r for r in reader]
print (data)
Code2:
from numpy import genfromtxt
my_data = genfromtxt('figure1_plotdata.csv', delimiter=',')
print (my_data)