InsertNewAfter Method (Python)

Inserts a new row or column, after the specified row or column, in the pivot table. To insert a new row, use this method with the row labels array. To insert a new column, use this method with the column labels array. The particular row or column is specified by providing the indexes of its associated label in the labels array. For example, to insert a column after the column whose label is "Mean", you provide the indexes of the label "Mean" in the column labels array.

  • A plus sign "+" is inserted in the first cell of the new row or column to prevent the row or column from being automatically hidden because it is empty.
  • In a table with nested or layered dimensions, a column or row is inserted at every corresponding dimension level.
Note: This method is not supported for legacy tables.

Syntax

SpssLabels.InsertNewAfter(row,column,label=None)

Parameters

row. Row index in the label array

column. Column index in the label array

label. An optional label for the new row or column. If omitted, a plus sign "+" is used for the label.