SetVarMeasureLevel Method (Python)

.SetVarMeasureLevel(varName,measureLevel). Sets the measurement level for a new variable. The argument varName is a string specifying the name of a new variable. The argument measureLevel is an integer specifying the measurement level: 2 (nominal), 3 (ordinal), 4 (scale).

  • This method is only available in write mode.

Example

cur=spss.Cursor(accessType='w')
cur.SetVarNameAndType(['numvar'],[0])
cur.SetVarMeasureLevel('numvar',3)
cur.CommitDictionary()
cur.close()