SetVarCValueLabel Method (Python)
.SetVarCValueLabel(varName,value,label). Sets the value label of a single value for a new string variable. The argument varName is a string specifying the name of a new string variable. The arguments value and label are strings specifying the value and the associated label. Use the SetVarNValueLabel method to set value labels for new numeric variables.
- This method is only available in write mode.
Example
cur=spss.Cursor(accessType='w')
cur.SetVarNameAndType(['strvar'],[8])
cur.SetVarCValueLabel('strvar','f','female')
cur.CommitDictionary()
cur.close()