insert(column:at:)
Adds a type-erased column at a position in the data frame.
Declaration
mutating func insert(column: AnyColumn, at index: Int)Parameters
- column:
A type-erased column. The column must have the same number of rows as the data frame, and must not have the same name as another column in the data frame.
- index:
A column position in the data frame.
Discussion
The method inserts the new column before the column currently at index. If you pass the array’s shape.column property as the index parameter, the method appends the new column to the data frame.