Icon

04 Numbers Strings and Rules - Solution

04 Numbers Strings and Rules - Solution
Exercise: Numbers, Strings, and Rules1.1) Read the travel advisories data by executing the File Reader node below1.2) Replace the colons in the Level column by hyphen, like this: "Level 1- Exercise normalprecautions"1.3) Extract the risk levels as numbers into a separate column. You can use, for example, thesubstr() function.1.4) Complete the tasks above with the Column Expressions node2.1) Read the population data by executing the Excel Reader node below2.2) Create a new column "Change" by substracting the population values in 2018 from thepopulation values in 20192.3) Convert the absolute population change values into percentages: divide them by thepopulation values in 2018 and multiply the result by 100.2.4) Create a categorical column with two values "increasing"/"decreasing" based on whether thechange is positive or negative travel_advidories.csvExtract numericrisk level into a separate columnReplace :by -Create ChangecolumnConvert change topercentageAdd Direction columnbased on +/- changeThe same tasks as abovedemographics.xlsx(population) File Reader String Manipulation String Manipulation Math Formula Math Formula Rule Engine Column Expressions Excel Reader Exercise: Numbers, Strings, and Rules1.1) Read the travel advisories data by executing the File Reader node below1.2) Replace the colons in the Level column by hyphen, like this: "Level 1- Exercise normalprecautions"1.3) Extract the risk levels as numbers into a separate column. You can use, for example, thesubstr() function.1.4) Complete the tasks above with the Column Expressions node2.1) Read the population data by executing the Excel Reader node below2.2) Create a new column "Change" by substracting the population values in 2018 from thepopulation values in 20192.3) Convert the absolute population change values into percentages: divide them by thepopulation values in 2018 and multiply the result by 100.2.4) Create a categorical column with two values "increasing"/"decreasing" based on whether thechange is positive or negative travel_advidories.csvExtract numericrisk level into a separate columnReplace :by -Create ChangecolumnConvert change topercentageAdd Direction columnbased on +/- changeThe same tasks as abovedemographics.xlsx(population) File Reader String Manipulation String Manipulation Math Formula Math Formula Rule Engine Column Expressions Excel Reader

Nodes

Extensions

Links