Icon

extra 03 Row and Column Filtering

03 Row and Column Filtering - Solution
Exercise: Row Filtering1) Read the adult.csv file by executing the CSV Reader node2) Filter out rows where the marital status is missing3) Extract rows where - the marital status is divorced- the marital status is never married and age is between 20 and 40 (both included)- the workclass starts with "S"5) How many adults are- divorced?- never married?- never married and between 20 and 40 years old?- with work class State-gov, Self-emp-not-inc, or Self-emp-inc? Exercise: Column Filtering1) Read the adult_education.table file by executing the Table Reader node2) Exclude the "education-num" column- manually- by including only string type columns no phone service mulitple lines = 6361yes multiple lines = 2971no multiple lines = 3390no multiple lines and female = 1671customerid starts with 3 = 653 Filter out rows where multiple lineshas no phone serviceYes Multiple linescustomerID starts with "3"No multiple linesNo multiple lines and femaleExclude education-nummanuallyExclude education-numby type selectionWA fn usectelco customerchurn.csvRead adult_education.tableRow Filter Row Filter Row Filter Row Filter Row Filter Column Filter Column Filter CSV Reader Table Reader Exercise: Row Filtering1) Read the adult.csv file by executing the CSV Reader node2) Filter out rows where the marital status is missing3) Extract rows where - the marital status is divorced- the marital status is never married and age is between 20 and 40 (both included)- the workclass starts with "S"5) How many adults are- divorced?- never married?- never married and between 20 and 40 years old?- with work class State-gov, Self-emp-not-inc, or Self-emp-inc? Exercise: Column Filtering1) Read the adult_education.table file by executing the Table Reader node2) Exclude the "education-num" column- manually- by including only string type columns no phone service mulitple lines = 6361yes multiple lines = 2971no multiple lines = 3390no multiple lines and female = 1671customerid starts with 3 = 653 Filter out rows where multiple lineshas no phone serviceYes Multiple linescustomerID starts with "3"No multiple linesNo multiple lines and femaleExclude education-nummanuallyExclude education-numby type selectionWA fn usectelco customerchurn.csvRead adult_education.tableRow Filter Row Filter Row Filter Row Filter Row Filter Column Filter Column Filter CSV Reader Table Reader

Nodes

Extensions

Links