python - "pandas.io.common.EmptyDataError: No columns to parse from file" after moving to mac -
in windows 8, script works fine. after moved script , data.csv work in mac, keep getting error: "pandas.io.common.emptydataerror: no columns parse file."
the script , data in same folder
"/users/myname/downloads/test/testimport.py" "/users/myname/downloads/test/test2.csv" i've tried many file locations read csv nothing works.
file_loc = "../test/test2.csv" # "../test2.csv", "/test2.csv", "/users/myname/downloads/test/test2.csv"  import pandas pd df = pd.read_csv(file_loc) exp_mat = df.as_matrix() print exp_mat how can read csv here? wrong location problem or csv filetype in mac not compatible?
here os x ei capitan. full error is
h143% python testimport.py traceback (most recent call last):   file "test_importexcel.py", line 24, in <module>     df = pd.read_csv(file_loc)   file "/users/myname/anaconda/lib/python2.7/site-packages/pandas/io/parsers.py", line 646, in parser_f     return _read(filepath_or_buffer, kwds)   file "/users/myname/anaconda/lib/python2.7/site-packages/pandas/io/parsers.py", line 389, in _read     parser = textfilereader(filepath_or_buffer, **kwds)   file "/users/myname/anaconda/lib/python2.7/site-packages/pandas/io/parsers.py", line 730, in __init__     self._make_engine(self.engine)   file "/users/myname/anaconda/lib/python2.7/site-packages/pandas/io/parsers.py", line 923, in _make_engine self._engine = cparserwrapper(self.f, **self.options)   file "/users/myname/anaconda/lib/python2.7/site-packages/pandas/io/parsers.py", line 1390, in __init__ self._reader = _parser.textreader(src, **kwds)   file "pandas/parser.pyx", line 538, in pandas.parser.textreader.__cinit__ (pandas/parser.c:6171) pandas.io.common.emptydataerror: no columns parse file data (copying number like)
x   time    value 445.1207    0.003626    21935450 445.1203    0.011099    36700932 445.1203    0.017235    35722172 445.1203    0.022958    33623668 445.1203    0.028689    33500360 352.3396    37.180567   307886720 352.3396    37.185836   303264100 352.3396    37.191101   292523810  
 
Comments
Post a Comment