Dataframe
 
0.15

insert

Edit page Last modified: 14 January 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: