Creating a Warnings Table (Python)
You can create an IBM® SPSS® Statistics Warnings
table using the BasePivotTable
class by specifying "Warnings"
for
the templateName argument. Note that an IBM SPSS Statistics Warnings
table has a very specific structure, so unless you actually want a
Warnings table you should avoid using "Warnings"
for templateName.
Example
import spss
spss.StartProcedure("demo")
table = spss.BasePivotTable("Warnings ","Warnings")
table.Append(spss.Dimension.Place.row,"rowdim",hideLabels=True)
rowLabel = spss.CellText.String("1")
table[(rowLabel,)] = spss.CellText.String("""First line of Warnings table content
Second line of Warnings table content""")
- The title argument is set to the string "Warnings ", It can be set to an arbitrary value but it cannot be identical to the templateName value, hence the space at the end of the string.
- The templateName argument must be set to the string "Warnings", independent of the IBM SPSS Statistics output language.
- A Warnings table has a single row dimension with all labels hidden and can consist of one or more rows. In this example, the table has a single multi-line row, formatted with a Python triple-quoted string.
Result
