SPSS Statistics

SPSS Statistics

Your hub for statistical analysis, data management, and data documentation. Connect, learn, and share with your peers! 


#Analytics
#SPSSStatistics
#Analyticstools
 View Only
  • 1.  Documentation for spss Python package

    Posted 03/01/22 12:25 PM
    So far I haven't been able to find method-by-method documentation of the spss Python package. I see different methods getting referenced in tutorials and am just looking for typical documentation so I can figure out how to use the package. Currently I'm trying to figure out how to translate something I have in a Python variable in a Python program into an SPSS variable outside the program.

    ------------------------------
    Kristian Canler
    ------------------------------

    #SPSSStatistics


  • 2.  RE: Documentation for spss Python package

    Posted 03/01/22 12:31 PM
    Hi. Are you looking for this?

    ------------------------------
    Rick Marcantonio
    Quality Assurance
    IBM
    ------------------------------



  • 3.  RE: Documentation for spss Python package

    Posted 03/01/22 12:54 PM
    In addition to the reference manual that Rick mentioned, there is a Programming and Data Management Book (pdf) available.  I always have trouble finding it online, but I have a copy of it posted here.
    The sample code in that package is still in Python 2, but I have a Python 3 version of all that that I can post if you need it.

    You might also be interested in the webinar that we put on recently on open source and SPSS Statistics.  You can find the recording and resources for it here.  (You have to register to get to it even though the webinar is over :-))


    --





  • 4.  RE: Documentation for spss Python package

    Posted 03/01/22 02:09 PM
    Thanks to both of you -- these resources were exactly what I needed. And yes, the resource for Python 3 would be great. And thanks for the webinar link!

    ------------------------------
    Kristian Canler
    ------------------------------



  • 5.  RE: Documentation for spss Python package

    Posted 03/01/22 02:15 PM
    Is there a version of the Programming for SPSS 24 document for the most recent version of SPSS? Is it possible version issues will be a significant issue here?

    ------------------------------
    Kristian Canler
    ------------------------------



  • 6.  RE: Documentation for spss Python package

    Posted 03/01/22 03:03 PM
    The api documentation in the Reference Manual should be used for 28, but the Programming and Data Management book would still apply to the current version other than needing Python 3 instead of Python 2.  Note that that implies that everything involving characters on the Python side would be in Unicode.

    --





  • 7.  RE: Documentation for spss Python package

    Posted 03/01/22 03:10 PM
    I uploaded the converted examples.  You can get them here.

    https://1drv.ms/u/s!AoWcE61g_FAdisZOgilciHKt0mf1uA?e=fKYOzM


    They were converted using the STATS CONVERT PYTHON extension command, which I wrote, and which is available via the Extensions > Extension Hub menu if you need to convert any old code.  They have only been lightly tested,  but only one rather esoteric example failed to convert with the tool.

    ------------------------------
    Jon Peck
    ------------------------------



  • 8.  RE: Documentation for spss Python package

    Posted 03/01/22 03:22 PM
    Thank you, Jon!

    ------------------------------
    Kristian Canler
    ------------------------------