Icon

06 Aggregations - Solution

06 Aggregations - Solution
Annotations and comments
  • Exercise: GroupBy 1) Read the adult.csv file by executing the File Reader node 2) Calculate the total number of rows and average age by gender 3) Calculate the modes of all string columns separately for each native country 4) Calculate - the number of missing values in the occupation column - the number of non-missing rows in the occupation column - the number of rows in the occupation column - the number of rows in the marital-status column Notice that the last two aggregations should provide the same numbers!
  • Exercise: Pivoting 1) Read the adult_binned.csv file by executing the File Reader node 2) Calculate the number of people in groups according to their work class and age bin - What is the most common combination of age bin and work class? - How many people belong to this group? 3) Calculate the mode of education level in groups according to their work class and age bin - What is the most widespread education level in the private workclass independently of the age bin?
  • The most common combination of age bin and work class is 34 or less years old and Private. 10936 people belong to this group.
  • The most widespread education level in the private workclass is number 9 (HS-grad).
  • Read data adult_binned.csv
  • Read data adult.csv
  • The total number of rows and average age by gender
  • The number of missing and non-missing values in occupation and total rows in occupation and in marital-status
  • The modes of string columns by native country
  • Create the table with age-bin as a group and workclass as a pivot and find the most widespread level of education in the private workclass
  • Create the table with age-bin as a group and workclass as a pivot and calculate the number of people in groups

Nodes

Extensions

Links