String Class (Python)
spss.CellText.String(value). Used to specify a string value for a category or a cell in a pivot table. The argument is the string value. You can also pass a numeric value, and it will be converted to a string.
- You can obtain a string representation of a
CellText.Stringobject using the toString method. For character representations of numeric values stored asCellText.Stringobjects, such asCellText.String("11"), you can obtain the numeric value using the toNumber method.
Example
from spss import CellText
table = spss.BasePivotTable("Table Title",
"OMS table subtype")
table.Append(spss.Dimension.Place.row,"rowdim")
table.Append(spss.Dimension.Place.column,"coldim")
table[(CellText.String("row1"),CellText.String("col1"))] = \
CellText.String("1")
table[(CellText.String("row2"),CellText.String("col1"))] = \
CellText.String("2")