You can use numpy.recfromcsv(filename)
: the types of each column will be automatically determined (as if you use np.genfromtxt()
with dtype=None
), and by default delimiter=","
. It's basically a shortcut for np.genfromtxt(filename, delimiter=",", dtype=None)
that Pierre GM pointed at in his answer.