varlist Property (Python)

The varlist property of a Dataset object returns an instance of the VariableList class. The VariableList class provides access to the variables in the associated dataset, allowing you to retrieve the properties of existing variables, modify variable properties, and add new variables to the dataset. See the topic VariableList Class (Python) for more information.

Example

import spss
spss.StartDataStep()
datasetObj = spss.Dataset('data1')
varListObj = datasetObj.varlist
spss.EndDataStep()