numpy Populate an array with the contents of a CSV file


Example

filePath = "file.csv"
data = np.genfromtxt(filePath)

Many options are supported, see official documentation for full list:

data = np.genfromtxt(filePath, dtype='float', delimiter=';', skip_header=1, usecols=(0,1,3) )