I need to put a certain code developed in Python 3 into a SPSS Modeler node (using the Extension Transform node). This code uses pandas and the default installation of Modeler doesn't include this module.
I tried to make SPSS to point to my own Python installation (which includes pandas module) by modifying the 'options.cfg' file following these instructions:
https://www.ibm.com/support/knowledgecenter/en/SS3RA7_sub/modeler_r_nodes_ddita/clementine/r_pyspark_api.html
However, when I try to import pandas inside SPSS Modeler, it isn't able to load the module. In fact I am not able to load pyspark neither by writing:
import spss.pyspark
Also when I try to see the directory of the python executable:
import sys
print sys.executable
SPSS gives back a 'None' value.
How can I get to work pandas in SPSS Modeler? It seems that I am not able to import any module in Modeler. I am a beginner in SPSS so any help would be appreciated.
You can install new packages to your existing SPSS Modeler 18.1 Version by going to your installation path, e.g. "C:\Program Files\IBM\SPSS\Modeler\18.1" and then into the folder python. There you open a windows command shell in admin mode. Now enter
python.exe -m pip install pandas
and it will install the library for SPSS to use.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With