Dataframe
 
1.0

insert

Edit pageLast modified: 20 May 2025

Inserts new column at specific position in DataFrame.

Similar to add, but supports column positioning.

Create new column based on existing columns and insert it into DataFrame:

df.insert("year of birth") { 2021 - age }.after { age }

Insert previously created column: