TiesdeKok / ipystata

Enables the use of Stata together with Python via Jupyter (IPython) notebooks.
192 stars 68 forks source link

Exception has occured. File could not be loaded. (Note, Pandas needs to be 0.17.x or higher.) #12

Closed xiaotinglei closed 8 years ago

xiaotinglei commented 8 years ago

import pandas as pd import ipystata

%%stata -o df sysuse auto, clear

the above is right. when i use my stata data, ipystata is wrong.

%%stata -o df use E:/projects/project2/Data/CGSS2006.dta,clear

Exception has occured. File could not be loaded. (Note, Pandas needs to be 0.17.x or higher.)

however, my pandas is above 0.17.x

how resolve this problem?

TiesdeKok commented 8 years ago

This error indicates that ipystata could not load the data back to Python. In many cases this is due to Stata saving to a file-format that older version of Pandas cannot load, hence the note in the error message. However, in your case this error is probably caused by something else.

Could you try adding the -os argument so that the Stata window remains open? I suspect that Stata cannot save the file, if this is the case you should be able to see the error if you use -os.

TiesdeKok commented 8 years ago

Closed because no response.