BaşlayınÜcretsiz Başlayın

Swap your SIM card

Great job so far! You were able to reshape your dataset in several ways. Now it's time to go a step further and analyze the data to discover if a customer's cell phone plan is related to the customer leaving.

You explore the churn dataset and notice that the row levels are not well organized. First, you want to rearrange your row indicesso it's easier to reshape your DataFrame.

The churn DataFrame is available for you. It contains data about minutes, voicemail, and data plans for different years. The data is indexed by state, city, and exited status. Make sure to examine it in the console!

Bu egzersiz

Reshaping Data with pandas

kursunun bir parçasıdır
Kursu Görüntüle

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Switch the first and third row index levels in churn
churn_swap = ____.____(____, ____)

# Print churn_swap
print(churn_swap)
Kodu Düzenle ve Çalıştır