I want to run a Java code, which is :
import org.python.util.PythonInterpreter;
public class PyConv {
public static void main(String[] args){
PythonInterpreter interpreter = new PythonInterpreter();
interpreter.execfile("Test.py");
}
}
And the Test.py file;
import pandas
import numpy
df = pd.read_csv("Myfile.csv", header=0)
But I would get an error:
Exception in thread "main" Traceback (most recent call last):
File "Test.py", line 1, in <module>
import pandas
ImportError: No module named pandas
So, How would one import the required module, to make the code run? And also I am using the Jython as a external jar in my java code. Is there any other way which would make my job simpler?