SetVarAlignment Method (Python)
.SetVarAlignment(varName,alignment). Sets the alignment of data values in the Data Editor for a new variable. It has no effect on the format of the variables or the display of the variables or values in other windows or printed results. The argument varName is a string specifying the name of a new variable. The argument alignment is an integer and can take on one of the following values: 0 (left), 1 (right), 2 (center).
- This method is only available in write mode.
Example
cur=spss.Cursor(accessType='w')
cur.SetVarNameAndType(['numvar'],[0])
cur.SetVarAlignment('numvar',0)
cur.CommitDictionary()
cur.close()