Created
March 9, 2023 10:27
-
-
Save jdunkerley/37653fed9c7c09bc8eed1e92852df235 to your computer and use it in GitHub Desktop.
Preppin Data Week 2 - in Enso
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from Standard.Base import all | |
from Standard.Table import all | |
from Standard.Database import all | |
import Standard.Visualization | |
main = | |
operator3 = enso_project.data/"Transactions.csv" . read | |
operator4 = enso_project.data/"Swift Codes.csv" . read | |
operator1 = operator4.use_first_row_as_names | |
operator2 = operator3.join operator1 Join_Kind.Inner "Bank" | |
operator5 = operator2.get 'Account Number' | |
operator6 = operator5.map .to_text | |
operator7 = operator6.rename "Account Number" | |
operator8 = operator2.get 'Sort Code' | |
operator9 = operator8.map (_.replace "-" "") | |
operator10 = operator9.rename "Sort Code" | |
operator11 = operator2.set operator7 | |
operator12 = operator11.set operator10 | |
operator13 = operator12.column_names | |
operator14 = operator12.set "'GB'+[Check Digits]+[SWIFT code]+[Sort Code]+[Account Number]" "IBAN" | |
operator15 = operator14.select_columns ["Transaction ID", "IBAN"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment