Icon

09_​Transformation - Solution

09_Transformation - Solution
Exercise 1 Numbers, Strings, and Rules1) Read data sales.csv available in the "data" folder2) Create a new column “currency” with value “USD” for the orders from the USA, and “EUR” for the orders from Germany3) Create a new column “conversion” with value 1 if currency is “EUR”, and 0.88 if currency is “USD” (we refer to theexchange rate of Nov-04-2018)4) Calculate values in a new column named “amount-in-EUR” by multiplying the value in column “amount” by the value incolumn “conversion”5) The product names are of type “prod_1”. Change the product names to “1”, “2”, and so on. Exercise 2 Column Expressions1) Read data sales.csv available in the "data" folder2) Write an expression that calculates the sales amount in euros- Create a variable “currency” with value “USD” for the orders from the USA, and “EUR” for the orders from Germany- Create a variable “conversion” with value 1 if currency is “EUR”, and 0.88 if currency is “USD” (we refer to the exchange rateof Nov-04-2018)- Multply the value of “amount” by the value of “conversion”- Append a new column and name it “amount-in-EUR” 3) Write an expression that extracts the first three letters of country names and converts them to upper case letters. Appenda new column and name it “Country_Code”.4) Write an expression that assigns the value “N” to the missing values in the “card” column. Replace the “card” column. Read data sales.csvCreate a newcolumn “currency”Create a newcolumn “conversionCalculate a new column"amount-in-EUR"Change theproduct namesRead data sales.csvTasks 2) - 4) File Reader Rule Engine Rule Engine Math Formula String Manipulation File Reader Column Expressions Exercise 1 Numbers, Strings, and Rules1) Read data sales.csv available in the "data" folder2) Create a new column “currency” with value “USD” for the orders from the USA, and “EUR” for the orders from Germany3) Create a new column “conversion” with value 1 if currency is “EUR”, and 0.88 if currency is “USD” (we refer to theexchange rate of Nov-04-2018)4) Calculate values in a new column named “amount-in-EUR” by multiplying the value in column “amount” by the value incolumn “conversion”5) The product names are of type “prod_1”. Change the product names to “1”, “2”, and so on. Exercise 2 Column Expressions1) Read data sales.csv available in the "data" folder2) Write an expression that calculates the sales amount in euros- Create a variable “currency” with value “USD” for the orders from the USA, and “EUR” for the orders from Germany- Create a variable “conversion” with value 1 if currency is “EUR”, and 0.88 if currency is “USD” (we refer to the exchange rateof Nov-04-2018)- Multply the value of “amount” by the value of “conversion”- Append a new column and name it “amount-in-EUR” 3) Write an expression that extracts the first three letters of country names and converts them to upper case letters. Appenda new column and name it “Country_Code”.4) Write an expression that assigns the value “N” to the missing values in the “card” column. Replace the “card” column. Read data sales.csvCreate a newcolumn “currency”Create a newcolumn “conversionCalculate a new column"amount-in-EUR"Change theproduct namesRead data sales.csvTasks 2) - 4) File Reader Rule Engine Rule Engine Math Formula String Manipulation File Reader Column Expressions

Nodes

Extensions

Links