1. Learn
  2. /
  3. Courses
  4. /
  5. Introduction to Predictive Analytics in Python

Exercise

Exploring the base table

Before diving into model building, it is important to understand the data you are working with. In this exercise, you will learn how to obtain the population size, number of targets and target incidence from a given basetable.

Instructions

100 XP
  • The basetable is loaded in a pandas object basetable. Assign the number of rows to the variable population_size and print it.
  • Assign the number of targets equal to one to the variable targets_count and print it.
  • Print the target incidence, this is the ratio of targets_count and population_size.