python - Numpy loadtxt file path name -


i wondering if had information on how load csv file using numpy's loadtxt. reason claims there no such file or directory, when there is. i've copy/pasted full path (with , without leading / root), no avail.

from numpy import * fh = loadtxt("/users/groenera/desktop/file.csv") 

or

from numpy import * fh = loadtxt("users/groenera/desktop/file.csv") 

thanks help. documentation loadtxt unhelpful (http://docs.scipy.org/doc/numpy/reference/generated/numpy.loadtxt.html).

this not loadtxt problem. try simply

f = open("/users/groenera/desktop/file.csv") 

to make sure loadtxt's fault. also, try using unicode string:

f = open(u"/users/groenera/desktop/file.csv") 

Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -