LoslegenKostenlos loslegen

Rating is not everything

Your first exploration of the books_gothic dataset was successful. Now, your next task is to perform a more detailed analysis. You need to reshape your DataFrame again. This time, you don't want to use all of your variables.

To that aim, you will melt your DataFrame, taking several approaches using different columns as identifiers and value variables.

The same books_gothic dataset you used before is available for you. It contains data about the title, author, number_pages, rating, rating_count, and publisher of each book. Make sure to examine it in the console!

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.

# Melt publisher column using title and authors as identifiers
publisher_melted = books_gothic.____(____=[____, ____], 
                                     value_vars=____)

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