Sort Variables in SPSS with Python

Sort Variables in SPSS with Python By Ruben Geert van den Berg under SPSS Python Basics We held a reaction time experiment in which people had to resolve 20 puzzles as fast as possible. The 20 answers and reactions times are in an SPSS data file which we named trials.sav. Part of if is shown

Set SPSS Variable Names as Labels with Python

Set SPSS Variable Names as Labels with Python By Ruben Geert van den Berg under SPSS Python Basics Our previous lesson started out with a rather problematic data file. We reordered our variables with Python and saved our data as trials-ordered.sav, the starting point for this lesson. The screenshot below shows part of the data.

Looping over SPSS Commands with Python

Looping over SPSS Commands with Python By Ruben Geert van den Berg under SPSS Python Basics A nasty limitation of SPSS is that some commands take only one variable. Now, DO REPEAT and LOOP allow us to loop over variables but they are limited to SPSS transformation commands. Python, however, allows us to loop over

Quick Overview Python Object Types

Quick Overview Python Object Types By Ruben Geert van den Berg under SPSS Python Basics In our examples, you’ll encounter terms such as a Python list or dict object. So which object types do we find in Python and what are their basic properties? The table below presents a quick overview. Quick Overview Python Object