Footnotes Method (Python)

.Footnotes(categories,footnote). Used to add a footnote to a table cell. The argument categories is a list or tuple of categories specifying the cell for which a footnote is to be added. Each element in the list or tuple must be a CellText object (one of CellText.Number, CellText.String, CellText.VarName, or CellText.VarValue). The argument footnote is a string specifying the footnote.

Example

table = spss.BasePivotTable("Table Title",
                            "OMS table subtype")

rowdim=table.Append(spss.Dimension.Place.row,"rowdim")
coldim=table.Append(spss.Dimension.Place.column,"coldim")

table.SetCategories(rowdim,spss.CellText.String("row1"))
table.SetCategories(coldim,spss.CellText.String("column1"))

table[(spss.CellText.String("row1"),spss.CellText.String("column1"))] = \
       spss.CellText.String("cell value")
table.Footnotes((spss.CellText.String("row1"),
                 spss.CellText.String("column1")),
     "Footnote for the cell specified by the categories row1 and column1")
  • The order in which dimensions are added to the table, either through a call to Append or to Insert, determines the order in which categories should be specified when providing the dimension coordinates for a particular cell. In the present example, the dimension rowdim is added first and coldim second, so the first element of (spss.CellText.String("row1"),spss.CellText.String("column1")) specifies a category of rowdim and the second element specifies a category of coldim.