Skip to content

Instantly share code, notes, and snippets.

@risenW
Created August 17, 2020 13:29
Show Gist options
  • Save risenW/0da00d7ec71c0679bb511ae5831e67a4 to your computer and use it in GitHub Desktop.
Save risenW/0da00d7ec71c0679bb511ae5831e67a4 to your computer and use it in GitHub Desktop.
//A feature engineering: Extract all titles from names columns
let title = df['Name'].apply((x) => { return x.split(".")[0] }).values
//replace in df
df.addColumn({ column: "Name", value: title })
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment