Skip to content

Instantly share code, notes, and snippets.

@RadLikeWhoa
Created March 13, 2017 09:33
Show Gist options
  • Save RadLikeWhoa/d4ebc040c9a4b39250bb3448a182f45b to your computer and use it in GitHub Desktop.
Save RadLikeWhoa/d4ebc040c9a4b39250bb3448a182f45b to your computer and use it in GitHub Desktop.
persons.csv: Trifacta Wrangler recipe
splitrows col: column1 on: '\n' quote: '\"'
split col: column1 on: ',' limit: 9 quote: '\"'
replace col: * with: '' on: '\"' global: true
header
delete row: ismissing([Index])
replace col: Small_Shirt_Size with: 'S' on: /X/
replace col: Medium_Shirt_Size with: 'M' on: /X/
replace col: Large_Shirt_Size with: 'L' on: /X/
merge col: Small_Shirt_Size,Medium_Shirt_Size,Large_Shirt_Size as: 'Shirt_Size'
drop col: Small_Shirt_Size,Medium_Shirt_Size,Large_Shirt_Size
set col: First_Name value: proper(First_Name)
replace col: Date_Of_Birth with: '$1-$2-19$4' on: /([0-3][0-9]).([0-1][0-9]).(19)?([0-9]{2})/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment