Session Ready
Exercise

Leveraging content knowledge

We have prior knowledge that the type of school a student goes to, elementary school, middle school, or high school, is more informative than the student's specific grade.

Let's create a feature that captures the school types using the grade column, where elementary_school contains 1st through 5th grade, middle_school contains 6th through 8th grade, and high_school contains 9th through 12th grade.

Instructions
100 XP
  • Create a new string column, school_type, in the discipline_logs data frame that contains the three school types: elementary, middle, and high school.
  • Create a table of the new column.