Exercise

A missed phone call

You finished reshaping your churn dataset in the previous exercises. Now, it is ready to be used. You remember that something caught your attention. You are sure you saw a clear pattern in the data.

Before you fit a classification model, you decide to do something simpler. You want to see what else you can learn from the data. You will reshape your data by unstacking levels, but you know this process will generate missing data that you need to handle.

The churn DataFrame contains different features of customers located in Los Angeles and New York, and is available for you. Make sure to examine it in the console!

Instructions

100 XP
  • Reshape the churn DataFrame by unstacking the level named churn, filling the missing values with zero.
  • Sort the churn DataFrame by the voice_mail_plan column in descending order, then by international_plan column in ascending order.
  • Print the final churn_sorted DataFrame.