SetVarLabel Method (Python)
.SetVarLabel(varName,varLabel). Sets the variable label for a new variable. The argument varName is a string specifying the name of a new variable. The argument varLabel is a string specifying the label.
- This method is only available in write mode.
Example
cur=spss.Cursor(accessType='w')
cur.SetVarNameAndType(['numvar'],[0])
cur.SetVarLabel('numvar','New numeric variable')
cur.CommitDictionary()
cur.close()