1. Learn
  2. /
  3. Courses
  4. /
  5. Reshaping Data with pandas

Connected

Exercise

Don't drop the stack

It's almost time to go home, but first, you need to finish your last task. You have a small dataset containing the total number of calls made by customers.

To perform your analysis, you need to reshape your churn data by stacking different levels. You know this process will generate missing data. You want to check if it is worth keeping the rows that contain all missing values, or if it's better to drop that information.

The churn DataFrame is available for you.

Instructions 1/2

undefined XP
  • 1

    Reshape the churn DataFrame by stacking the type level. Then, fill the missing values generated with the value zero.

  • 2

    Stack the scope level of churn without dropping the rows with missing values. Then, fill the missing values with zero.