LoslegenKostenlos loslegen

Two many calls

Your last analysis was successful, but you still have some questions to answer. You are not satisfied with the organization of the data in your DataFrame.

For that reason, you plan on switching and rearranging row and column indices by chaining the stacking and unstacking processes. Also, you would like to rearrange several levels at the same time.

The same 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.

Diese Übung ist Teil des Kurses

Reshaping Data with pandas

Kurs anzeigen

Interaktive Übung

Versuche dich an dieser Übung, indem du diesen Beispielcode vervollständigst.

# Unstack the first and second row level of churn
churn_unstack = ____.____(____=[____, ____])

# Print churn_unstack
print(churn_unstack)
Code bearbeiten und ausführen